diff --git a/02_activities/assignments/assignment_1.ipynb b/02_activities/assignments/assignment_1.ipynb index 758944ea8..2dca19d0b 100644 --- a/02_activities/assignments/assignment_1.ipynb +++ b/02_activities/assignments/assignment_1.ipynb @@ -56,76 +56,32 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# For testing purposes, we will write our code in the function\n", "def anagram_checker(word_a, word_b):\n", - " # Covert every letter to lower case\n", - " word_a = word_a.lower()\n", - " word_b = word_b.lower()\n", - " # Check if the words are anagram\n", - " return sorted(word_a) == sorted(word_b)" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "True" - ] - }, - "execution_count": 13, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ + " # Your code here\n", + "\n", "# Run your code to check using the words below:\n", "anagram_checker(\"Silent\", \"listen\")" ] }, { "cell_type": "code", - "execution_count": 14, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "False" - ] - }, - "execution_count": 14, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "anagram_checker(\"Silent\", \"Night\")" ] }, { "cell_type": "code", - "execution_count": 15, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "True" - ] - }, - "execution_count": 15, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "anagram_checker(\"night\", \"Thing\")" ] @@ -141,77 +97,31 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ "def anagram_checker(word_a, word_b, is_case_sensitive):\n", - " # Covert to lower case if is_case_sensitive is set to False\n", - " if not is_case_sensitive:\n", - " word_a = word_a.lower()\n", - " word_b = word_b.lower()\n", - " # Check if the words are anagram\n", - " return sorted(word_a) == sorted(word_b)\n", - " # Modify your existing code here" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "True" - ] - }, - "execution_count": 17, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ + " # Modify your existing code here\n", + "\n", "# Run your code to check using the words below:\n", "anagram_checker(\"Silent\", \"listen\", False) # True" ] }, { "cell_type": "code", - "execution_count": 18, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "False" - ] - }, - "execution_count": 18, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "anagram_checker(\"Silent\", \"listen\", True) # False" ] }, { "cell_type": "code", - "execution_count": 19, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "False" - ] - }, - "execution_count": 19, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "anagram_checker(\"Silent\", \"Listen\", True) # False" ] @@ -229,7 +139,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "new-learner", "language": "python", "name": "python3" }, @@ -243,9 +153,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.2" + "version": "3.11.8" } }, "nbformat": 4, - "nbformat_minor": 4 + "nbformat_minor": 2 }