From fe7f3ac39da9dcf1dcc0a4cc2ddf783dea69c6eb Mon Sep 17 00:00:00 2001 From: VincentSchaik Date: Wed, 20 Aug 2025 19:11:29 -0400 Subject: [PATCH] Assignment-1 anagram_checker completed. --- 02_activities/assignments/assignment_1.ipynb | 23 ++++++++++---------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/02_activities/assignments/assignment_1.ipynb b/02_activities/assignments/assignment_1.ipynb index 71d8ecc31..8ecfd8ca2 100644 --- a/02_activities/assignments/assignment_1.ipynb +++ b/02_activities/assignments/assignment_1.ipynb @@ -56,7 +56,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 17, "metadata": {}, "outputs": [ { @@ -65,7 +65,7 @@ "True" ] }, - "execution_count": 15, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -75,6 +75,7 @@ "def anagram_checker(word_a, word_b):\n", " \"\"\"Check if two words are anagrams of each other.\n", " An anagram is a word formed by rearranging the letters of another.\n", + " For example, \"listen\" is an anagram of \"silent\".\n", " \n", " Parameters:\n", " word_a (str): The first word to check.\n", @@ -97,7 +98,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 18, "metadata": {}, "outputs": [ { @@ -106,7 +107,7 @@ "False" ] }, - "execution_count": 16, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } @@ -117,7 +118,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 19, "metadata": {}, "outputs": [ { @@ -126,7 +127,7 @@ "True" ] }, - "execution_count": 3, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } @@ -146,7 +147,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 20, "metadata": {}, "outputs": [ { @@ -155,7 +156,7 @@ "True" ] }, - "execution_count": 13, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } @@ -165,7 +166,7 @@ "\n", "def anagram_checker(word_a, word_b, is_case_sensitive):\n", " \"\"\" Check if two words are anagrams of each other.\n", - " \n", + " An anagram is a word formed by rearranging the letters of another.\n", " Args:\n", " word_a (str): The first word.\n", " word_b (str): The second word.\n", @@ -201,7 +202,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 21, "metadata": {}, "outputs": [ { @@ -210,7 +211,7 @@ "False" ] }, - "execution_count": 14, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" }