|
15 | 15 | "source": [ |
16 | 16 | "## Submission Information\n", |
17 | 17 | "\n", |
18 | | - "🚨**Please review our [Assignment Submission Guide](https://github.com/UofT-DSI/onboarding/blob/main/onboarding_documents/submissions.md)**🚨 for detailed instructions on how to format, branch, and submit your work. Following these guidelines is crucial for your submissions to be evaluated correctly.\n", |
| 18 | + "🚨 **Please review our [Assignment Submission Guide](https://github.com/UofT-DSI/onboarding/blob/main/onboarding_documents/submissions.md)** 🚨 for detailed instructions on how to format, branch, and submit your work. Following these guidelines is crucial for your submissions to be evaluated correctly.\n", |
19 | 19 | "\n", |
20 | 20 | "### Submission Parameters:\n", |
21 | 21 | "* Submission Due Date: `11:59 PM - 05/05/2024`\n", |
|
56 | 56 | }, |
57 | 57 | { |
58 | 58 | "cell_type": "code", |
59 | | - "execution_count": 39, |
| 59 | + "execution_count": null, |
60 | 60 | "metadata": {}, |
61 | | - "outputs": [ |
62 | | - { |
63 | | - "data": { |
64 | | - "text/plain": [ |
65 | | - "True" |
66 | | - ] |
67 | | - }, |
68 | | - "execution_count": 39, |
69 | | - "metadata": {}, |
70 | | - "output_type": "execute_result" |
71 | | - } |
72 | | - ], |
| 61 | + "outputs": [], |
73 | 62 | "source": [ |
74 | 63 | "# This is a function, which we will learn more about next week. For testing purposes, we will write our code in the function\n", |
75 | 64 | "def anagram_checker(word_a, word_b):\n", |
76 | | - " small_a = word_a.lower()\n", |
77 | | - " small_b = word_b.lower()\n", |
78 | | - " return sorted(small_a)==sorted(small_b)\n", |
| 65 | + " # Your code here\n", |
79 | 66 | "\n", |
80 | 67 | "# Run your code to check using the words below:\n", |
81 | 68 | "anagram_checker(\"Slient\", \"listen\")" |
82 | 69 | ] |
83 | 70 | }, |
84 | 71 | { |
85 | 72 | "cell_type": "code", |
86 | | - "execution_count": 40, |
| 73 | + "execution_count": null, |
87 | 74 | "metadata": {}, |
88 | | - "outputs": [ |
89 | | - { |
90 | | - "data": { |
91 | | - "text/plain": [ |
92 | | - "False" |
93 | | - ] |
94 | | - }, |
95 | | - "execution_count": 40, |
96 | | - "metadata": {}, |
97 | | - "output_type": "execute_result" |
98 | | - } |
99 | | - ], |
| 75 | + "outputs": [], |
100 | 76 | "source": [ |
101 | 77 | "anagram_checker(\"Slient\", \"Night\")" |
102 | 78 | ] |
103 | 79 | }, |
104 | 80 | { |
105 | 81 | "cell_type": "code", |
106 | | - "execution_count": 41, |
| 82 | + "execution_count": null, |
107 | 83 | "metadata": {}, |
108 | | - "outputs": [ |
109 | | - { |
110 | | - "data": { |
111 | | - "text/plain": [ |
112 | | - "True" |
113 | | - ] |
114 | | - }, |
115 | | - "execution_count": 41, |
116 | | - "metadata": {}, |
117 | | - "output_type": "execute_result" |
118 | | - } |
119 | | - ], |
| 84 | + "outputs": [], |
120 | 85 | "source": [ |
121 | 86 | "anagram_checker(\"night\", \"Thing\")" |
122 | 87 | ] |
|
132 | 97 | }, |
133 | 98 | { |
134 | 99 | "cell_type": "code", |
135 | | - "execution_count": 98, |
| 100 | + "execution_count": null, |
136 | 101 | "metadata": {}, |
137 | | - "outputs": [ |
138 | | - { |
139 | | - "name": "stdout", |
140 | | - "output_type": "stream", |
141 | | - "text": [ |
142 | | - "True\n" |
143 | | - ] |
144 | | - } |
145 | | - ], |
| 102 | + "outputs": [], |
146 | 103 | "source": [ |
147 | 104 | "def anagram_checker(word_a, word_b, is_case_sensitive):\n", |
148 | | - " small_a = word_a.lower()\n", |
149 | | - " small_b = word_b.lower()\n", |
150 | | - " if is_case_sensitive is True and sorted(small_a)==sorted(small_b) and sorted(word_a)==sorted(word_b):\n", |
151 | | - " print(\"True\")\n", |
152 | | - " elif is_case_sensitive is False and sorted(small_a)==sorted(small_b):\n", |
153 | | - " print(\"True\")\n", |
154 | | - " else: print(\"False\")\n", |
155 | | - "anagram_checker(\"Slient\", \"listen\", False)" |
| 105 | + " # Modify your existing code here\n", |
| 106 | + "\n", |
| 107 | + "# Run your code to check using the words below:\n", |
| 108 | + "anagram_checker(\"Slient\", \"listen\", False) # True" |
156 | 109 | ] |
157 | 110 | }, |
158 | 111 | { |
159 | 112 | "cell_type": "code", |
160 | | - "execution_count": 99, |
| 113 | + "execution_count": null, |
161 | 114 | "metadata": {}, |
162 | | - "outputs": [ |
163 | | - { |
164 | | - "name": "stdout", |
165 | | - "output_type": "stream", |
166 | | - "text": [ |
167 | | - "False\n" |
168 | | - ] |
169 | | - } |
170 | | - ], |
| 115 | + "outputs": [], |
171 | 116 | "source": [ |
172 | | - "\n", |
173 | | - "# Run your code to check using the words below:\n", |
174 | | - "def anagram_checker(word_a, word_b, is_case_sensitive):\n", |
175 | | - " small_a = word_a.lower()\n", |
176 | | - " small_b = word_b.lower()\n", |
177 | | - " if is_case_sensitive is True and sorted(small_a)==sorted(small_b) and sorted(word_a)==sorted(word_b):\n", |
178 | | - " print(\"True\")\n", |
179 | | - " elif is_case_sensitive is False and sorted(small_a)==sorted(small_b):\n", |
180 | | - " print(\"True\")\n", |
181 | | - " else: print(\"False\")\n", |
182 | | - "anagram_checker(\"Slient\", \"listen\", True)\n", |
183 | | - " # True" |
| 117 | + "anagram_checker(\"Slient\", \"Listen\", True) # False" |
184 | 118 | ] |
185 | 119 | }, |
186 | 120 | { |
|
210 | 144 | "name": "python", |
211 | 145 | "nbconvert_exporter": "python", |
212 | 146 | "pygments_lexer": "ipython3", |
213 | | - "version": "3.9.6" |
| 147 | + "version": "3.11.8" |
214 | 148 | } |
215 | 149 | }, |
216 | 150 | "nbformat": 4, |
|
0 commit comments