From aab6f0fc730f9f0f13fc637163f7515f9e087be1 Mon Sep 17 00:00:00 2001 From: ruokun-ai Date: Mon, 20 Apr 2026 04:27:32 -0400 Subject: [PATCH 1/4] save assignment_1 --- assignment_1.ipynb | 177 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 assignment_1.ipynb diff --git a/assignment_1.ipynb b/assignment_1.ipynb new file mode 100644 index 000000000..c78dc9ed8 --- /dev/null +++ b/assignment_1.ipynb @@ -0,0 +1,177 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "dbbc3ef6", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# =========================\n", + "# Part 1: Building the base Anagram Checker\n", + "# =========================\n", + "\n", + "# For testing purposes, we will write our code in the function\n", + "def anagram_checker(word_a, word_b):\n", + " # Convert both words to lowercase to ignore case differences\n", + " word_a = word_a.lower()\n", + " word_b = word_b.lower()\n", + " \n", + " return sorted(word_a) == sorted(word_b)\n", + "\n", + "# Run your code to check using the words below:\n", + "anagram_checker(\"Silent\", \"listen\")" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "2e806e7a", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "anagram_checker(\"Silent\", \"Night\")" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "79638572", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "anagram_checker(\"night\", \"Thing\")" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "7952b363", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# =========================\n", + "# Part 2: Expanding the functionality of the Anagram Checker\n", + "# =========================\n", + "\n", + "def anagram_checker(word_a, word_b, is_case_sensitive):\n", + " # If case sensitivity is False, we treat uppercase and lowercase letters as the same\n", + " if is_case_sensitive == False:\n", + " word_a = word_a.lower()\n", + " word_b = word_b.lower()\n", + "\n", + " return sorted(word_a) == sorted(word_b)\n", + "\n", + "# Run your code to check using the words below:\n", + "anagram_checker(\"Silent\", \"listen\", False) # True" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "fc42eeb5", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "anagram_checker(\"Silent\", \"listen\", True) # False" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "a7439875", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "anagram_checker(\"Silent\", \"Listen\", True) # False" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "python-env", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.15" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From 0853f6a1eb67b1c59af0ad96493c9c36e6f3df54 Mon Sep 17 00:00:00 2001 From: ruokun-ai Date: Mon, 20 Apr 2026 04:32:17 -0400 Subject: [PATCH 2/4] add code for assignment_1 --- assignment_1.ipynb | 177 --------------------------------------------- 1 file changed, 177 deletions(-) delete mode 100644 assignment_1.ipynb diff --git a/assignment_1.ipynb b/assignment_1.ipynb deleted file mode 100644 index c78dc9ed8..000000000 --- a/assignment_1.ipynb +++ /dev/null @@ -1,177 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "id": "dbbc3ef6", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "True" - ] - }, - "execution_count": 1, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# =========================\n", - "# Part 1: Building the base Anagram Checker\n", - "# =========================\n", - "\n", - "# For testing purposes, we will write our code in the function\n", - "def anagram_checker(word_a, word_b):\n", - " # Convert both words to lowercase to ignore case differences\n", - " word_a = word_a.lower()\n", - " word_b = word_b.lower()\n", - " \n", - " return sorted(word_a) == sorted(word_b)\n", - "\n", - "# Run your code to check using the words below:\n", - "anagram_checker(\"Silent\", \"listen\")" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "2e806e7a", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "False" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "anagram_checker(\"Silent\", \"Night\")" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "79638572", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "True" - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "anagram_checker(\"night\", \"Thing\")" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "7952b363", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "True" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# =========================\n", - "# Part 2: Expanding the functionality of the Anagram Checker\n", - "# =========================\n", - "\n", - "def anagram_checker(word_a, word_b, is_case_sensitive):\n", - " # If case sensitivity is False, we treat uppercase and lowercase letters as the same\n", - " if is_case_sensitive == False:\n", - " word_a = word_a.lower()\n", - " word_b = word_b.lower()\n", - "\n", - " return sorted(word_a) == sorted(word_b)\n", - "\n", - "# Run your code to check using the words below:\n", - "anagram_checker(\"Silent\", \"listen\", False) # True" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "fc42eeb5", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "False" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "anagram_checker(\"Silent\", \"listen\", True) # False" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "a7439875", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "False" - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "anagram_checker(\"Silent\", \"Listen\", True) # False" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "python-env", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.15" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} From c8d1dbdbbf4eee4308ebd6c0226ec89f1a8cde4c Mon Sep 17 00:00:00 2001 From: ruokun-ai Date: Mon, 20 Apr 2026 04:33:40 -0400 Subject: [PATCH 3/4] save assignment_1 --- 02_activities/assignments/assignment_1.ipynb | 109 ++++++++++++++++--- 1 file changed, 92 insertions(+), 17 deletions(-) diff --git a/02_activities/assignments/assignment_1.ipynb b/02_activities/assignments/assignment_1.ipynb index 72c8aec96..0bd79eb67 100644 --- a/02_activities/assignments/assignment_1.ipynb +++ b/02_activities/assignments/assignment_1.ipynb @@ -56,13 +56,28 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "# For testing purposes, we will write our code in the function\n", "def anagram_checker(word_a, word_b):\n", - " # Your code here\n", + " # Convert both words to lowercase to ignore case differences\n", + " word_a = word_a.lower()\n", + " word_b = word_b.lower()\n", + " \n", + " return sorted(word_a) == sorted(word_b)\n", "\n", "# Run your code to check using the words below:\n", "anagram_checker(\"Silent\", \"listen\")" @@ -70,18 +85,40 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "anagram_checker(\"Silent\", \"Night\")" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "anagram_checker(\"night\", \"Thing\")" ] @@ -97,12 +134,28 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "def anagram_checker(word_a, word_b, is_case_sensitive):\n", - " # Modify your existing code here\n", + " # If case sensitivity is False, we treat uppercase and lowercase letters as the same\n", + " if is_case_sensitive == False:\n", + " word_a = word_a.lower()\n", + " word_b = word_b.lower()\n", + "\n", + " return sorted(word_a) == sorted(word_b)\n", "\n", "# Run your code to check using the words below:\n", "anagram_checker(\"Silent\", \"listen\", False) # True" @@ -110,20 +163,42 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "anagram_checker(\"Silent\", \"listen\", True) # False" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "anagram_checker(\"Silent\", \"Listen\", True) # False" + "anagram_checker(\"Silent\", \"listen\", True) # False" ] }, { @@ -139,7 +214,7 @@ ], "metadata": { "kernelspec": { - "display_name": "new-learner", + "display_name": "python-env", "language": "python", "name": "python3" }, @@ -153,7 +228,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.8" + "version": "3.11.15" } }, "nbformat": 4, From 08767d4331fb2edc11b0610abe2fde22c7bbff2b Mon Sep 17 00:00:00 2001 From: ruokun-ai Date: Mon, 20 Apr 2026 04:46:30 -0400 Subject: [PATCH 4/4] updatged assignment_1 --- 02_activities/assignments/assignment_1.ipynb | 44 ++++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/02_activities/assignments/assignment_1.ipynb b/02_activities/assignments/assignment_1.ipynb index 0bd79eb67..e91557af4 100644 --- a/02_activities/assignments/assignment_1.ipynb +++ b/02_activities/assignments/assignment_1.ipynb @@ -56,7 +56,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -65,7 +65,7 @@ "True" ] }, - "execution_count": 2, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -73,19 +73,20 @@ "source": [ "# For testing purposes, we will write our code in the function\n", "def anagram_checker(word_a, word_b):\n", - " # Convert both words to lowercase to ignore case differences\n", + " # convert both words to lowercase and ignore case differences\n", " word_a = word_a.lower()\n", " word_b = word_b.lower()\n", " \n", + " # Sort the characters of both words and compare\n", " return sorted(word_a) == sorted(word_b)\n", "\n", - "# Run your code to check using the words below:\n", + "# Run the code to check\n", "anagram_checker(\"Silent\", \"listen\")" ] }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 10, "metadata": {}, "outputs": [ { @@ -94,18 +95,18 @@ "False" ] }, - "execution_count": 3, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "anagram_checker(\"Silent\", \"Night\")" + "anagram_checker(\"Slient\", \"Night\")" ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 11, "metadata": {}, "outputs": [ { @@ -114,13 +115,13 @@ "True" ] }, - "execution_count": 4, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "anagram_checker(\"night\", \"Thing\")" + "anagram_checker(\"night\",\"Thing\")" ] }, { @@ -134,7 +135,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -143,27 +144,26 @@ "True" ] }, - "execution_count": 5, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "def anagram_checker(word_a, word_b, is_case_sensitive):\n", - " # If case sensitivity is False, we treat uppercase and lowercase letters as the same\n", + " # if case sensitivity is False, we treat uppercase and lowercase as the same\n", " if is_case_sensitive == False:\n", " word_a = word_a.lower()\n", " word_b = word_b.lower()\n", - "\n", + " # Sort the characters of both words and compare\n", " return sorted(word_a) == sorted(word_b)\n", - "\n", - "# Run your code to check using the words below:\n", - "anagram_checker(\"Silent\", \"listen\", False) # True" + "# Run the code to check\n", + "anagram_checker(\"Silent\", \"listen\", False) # True " ] }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 16, "metadata": {}, "outputs": [ { @@ -172,7 +172,7 @@ "False" ] }, - "execution_count": 6, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -183,7 +183,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 17, "metadata": {}, "outputs": [ { @@ -192,13 +192,13 @@ "False" ] }, - "execution_count": 7, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "anagram_checker(\"Silent\", \"listen\", True) # False" + "anagram_checker(\"Silent\", \"Listen\", True) # False" ] }, {