Skip to content

Commit 0280ac0

Browse files
committed
Added additional instrucions
made the allergy check first comment clearer
1 parent e81093b commit 0280ac0

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

Python Absolute Beginner/Module_1.1_Practice.ipynb

+18-5
Original file line numberDiff line numberDiff line change
@@ -988,13 +988,26 @@
988988
},
989989
{
990990
"cell_type": "code",
991-
"execution_count": null,
992-
"metadata": {},
993-
"outputs": [],
991+
"execution_count": 2,
992+
"metadata": {},
993+
"outputs": [
994+
{
995+
"ename": "KeyboardInterrupt",
996+
"evalue": "",
997+
"output_type": "error",
998+
"traceback": [
999+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
1000+
"\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
1001+
"Cell \u001b[0;32mIn[2], line 6\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# Allergy check \u001b[39;00m\n\u001b[1;32m 2\u001b[0m \n\u001b[1;32m 3\u001b[0m \u001b[38;5;66;03m# 1[ ] get input for test\u001b[39;00m\n\u001b[0;32m----> 6\u001b[0m \u001b[38;5;28;01mwhile\u001b[39;00m \u001b[38;5;28;01mTrue\u001b[39;00m:\n\u001b[1;32m 7\u001b[0m \u001b[38;5;28;01mpass\u001b[39;00m\n\u001b[1;32m 9\u001b[0m \u001b[38;5;66;03m# 2/3[ ] print True if \"dairy\" is in the input or False if not\u001b[39;00m\n\u001b[1;32m 10\u001b[0m \n\u001b[1;32m 11\u001b[0m \n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 15\u001b[0m \n\u001b[1;32m 16\u001b[0m \u001b[38;5;66;03m# 4+[ ] Challenge: Check if \"chocolate\" is in the input\u001b[39;00m\n",
1002+
"\u001b[0;31mKeyboardInterrupt\u001b[0m: "
1003+
]
1004+
}
1005+
],
9941006
"source": [
9951007
"# Allergy check \n",
9961008
"\n",
997-
"# 1[ ] get input for test\n",
1009+
"# 1[ ] get input for test (prompt user to enter something like \"nuts\" or \"dairy\" to store in variable named \"test\")\n",
1010+
"\n",
9981011
"\n",
9991012
"\n",
10001013
"# 2/3[ ] print True if \"dairy\" is in the input or False if not\n",
@@ -1033,7 +1046,7 @@
10331046
"name": "python",
10341047
"nbconvert_exporter": "python",
10351048
"pygments_lexer": "ipython3",
1036-
"version": "3.8.8"
1049+
"version": "3.11.4"
10371050
}
10381051
},
10391052
"nbformat": 4,

0 commit comments

Comments
 (0)