Skip to content

Commit 70e8b5b

Browse files
authored
Reverse editing
reverse editing assignemnt_1.ipynb to original version
1 parent b8ad1ff commit 70e8b5b

1 file changed

Lines changed: 18 additions & 84 deletions

File tree

02_assignments/assignment_1.ipynb

Lines changed: 18 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"source": [
1616
"## Submission Information\n",
1717
"\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",
1919
"\n",
2020
"### Submission Parameters:\n",
2121
"* Submission Due Date: `11:59 PM - 05/05/2024`\n",
@@ -56,67 +56,32 @@
5656
},
5757
{
5858
"cell_type": "code",
59-
"execution_count": 39,
59+
"execution_count": null,
6060
"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": [],
7362
"source": [
7463
"# This is a function, which we will learn more about next week. For testing purposes, we will write our code in the function\n",
7564
"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",
7966
"\n",
8067
"# Run your code to check using the words below:\n",
8168
"anagram_checker(\"Slient\", \"listen\")"
8269
]
8370
},
8471
{
8572
"cell_type": "code",
86-
"execution_count": 40,
73+
"execution_count": null,
8774
"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": [],
10076
"source": [
10177
"anagram_checker(\"Slient\", \"Night\")"
10278
]
10379
},
10480
{
10581
"cell_type": "code",
106-
"execution_count": 41,
82+
"execution_count": null,
10783
"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": [],
12085
"source": [
12186
"anagram_checker(\"night\", \"Thing\")"
12287
]
@@ -132,55 +97,24 @@
13297
},
13398
{
13499
"cell_type": "code",
135-
"execution_count": 98,
100+
"execution_count": null,
136101
"metadata": {},
137-
"outputs": [
138-
{
139-
"name": "stdout",
140-
"output_type": "stream",
141-
"text": [
142-
"True\n"
143-
]
144-
}
145-
],
102+
"outputs": [],
146103
"source": [
147104
"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"
156109
]
157110
},
158111
{
159112
"cell_type": "code",
160-
"execution_count": 99,
113+
"execution_count": null,
161114
"metadata": {},
162-
"outputs": [
163-
{
164-
"name": "stdout",
165-
"output_type": "stream",
166-
"text": [
167-
"False\n"
168-
]
169-
}
170-
],
115+
"outputs": [],
171116
"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"
184118
]
185119
},
186120
{
@@ -210,7 +144,7 @@
210144
"name": "python",
211145
"nbconvert_exporter": "python",
212146
"pygments_lexer": "ipython3",
213-
"version": "3.9.6"
147+
"version": "3.11.8"
214148
}
215149
},
216150
"nbformat": 4,

0 commit comments

Comments
 (0)