You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"source": "# Module 1 Required Coding Activity \nIntroduction to Python Unit 1\n\nThis is an activity from the Jupyter Notebook **`Practice_MOD01_1-2_IntroPy.ipynb`** which you may have already completed.\n\n> **NOTE:** This program requires print output and code syntax used in module 1\n\n| Some Assignment Requirements | \n|:-------------------------------| \n| **NOTE:** This program requires `print` output and using code syntax used in module 1 such as variable assignment, `input`, `in` keyword, `.lower()` or `.upper()` method | \n\n\n## Program: Allergy Check \n\n1. **[ ]** get user **`input`** for categories of food eaten in the last 24 hours \n save in a variable called **input_test** \n *example input*\n [ ](https://1drv.ms/i/s!Am_KPRosgtaij65qzFD5CGvv95-ijg)\n \n2. **[ ]** print **`True`** if \"dairy\" is in the **input_test** string \n**[ ]** Test the code so far \n \n3. **[ ]** modify the print statement to output similar to below \n*example output*\n[ ](https://1drv.ms/i/s!Am_KPRosgtaij65rET-wmlpCdMX7CQ) \nTest the code so far trying input including the string \"dairy\" and without \n \n\n4. **[ ]** repeat the process checking the input for \"nuts\", **challenge** add \"Seafood\" and \"chocolate\" \n**[ ]** Test your code \n \n \n5. **[ ] challenge:** make your code work for input regardless of case, e.g. - print **`True`** for \"Nuts\", \"NuTs\", \"NUTS\" or \"nuts\" \n"
9
-
},
10
-
{
11
-
"metadata": {
12
-
"collapsed": true,
13
-
"trusted": false
14
-
},
15
-
"cell_type": "code",
16
-
"source": "# Create Allergy check code\n# then PASTE THIS CODE into edX\n\n# [ ] get input for input_test variable\nxl/fjnzs/lfgs?FDNv\n\n# [ ] print \"True\" message if \"dairy\" is in the input or False message if not\nslf/lasjdbfn/\n\n# [ ] print True message if \"nuts\" is in the input or False if not\nsda;lkfhj/LSJDFH\n\n# [ ] Challenge: Check if \"seafood\" is in the input - print message\n\nsadfklh/hasdf\n# [ ] Challenge: Check if \"chocolate\" is in the input - print message",
17
-
"execution_count": 1,
18
-
"outputs": []
19
-
},
20
-
{
21
-
"metadata": {},
22
-
"cell_type": "markdown",
23
-
"source": "### Need assignment tips and clarification? \nSee the video on the \"End of Module coding assignment > Module 1 Required Code Description\" course page on [edX](https://courses.edx.org/courses/course-v1:Microsoft+DEV236x+4T2017/course) \n\n\n# Important: [How to submit the code in edX by pasting](https://courses.edx.org/courses/course-v1:Microsoft+DEV236x+1T2017/wiki/Microsoft.DEV236x.3T2018/paste-code-end-module-coding-assignments/)https://preview.edx.org/courses/course-v1:Microsoft+DEV236x+3T2018/wiki/Microsoft.DEV236x.1T2017/paste-code-end-module-coding-assignments/"
"This is an activity from the Jupyter Notebook **`Practice_MOD01_1-2_IntroPy.ipynb`** which you may have already completed.\n",
13
+
"\n",
14
+
"> **NOTE:** This program requires print output and code syntax used in module 1\n",
15
+
"\n",
16
+
"| Some Assignment Requirements | \n",
17
+
"|:-------------------------------| \n",
18
+
"| **NOTE:** This program requires `print` output and using code syntax used in module 1 such as variable assignment, `input`, `in` keyword, `.lower()` or `.upper()` method | \n",
19
+
"\n",
20
+
"\n",
21
+
"## Program: Allergy Check \n",
22
+
"\n",
23
+
"1. **[ ]** get user **`input`** for categories of food eaten in the last 24 hours \n",
24
+
" save in a variable called **input_test** \n",
25
+
" *example input*\n",
26
+
" [ ](https://1drv.ms/i/s!Am_KPRosgtaij65qzFD5CGvv95-ijg)\n",
27
+
" \n",
28
+
"2. **[ ]** print **`True`** if \"dairy\" is in the **input_test** string \n",
29
+
"**[ ]** Test the code so far \n",
30
+
" \n",
31
+
"3. **[ ]** modify the print statement to output similar to below \n",
"source": "# Module 2 Required Coding Activity \nIntroduction to Python Unit 1 \n\nThis is an activity based on code similar to the Jupyter Notebook **`Practice_MOD02_1-3_IntroPy.ipynb`** which you may have completed.\n\n| Some Assignment Requirements | \n|:-------------------------------| \n| **NOTE:** This program requires a **function** be defined, created and called. The call will send values based on user input. The function call must capture a `return` value that is used in print output. The function will have parameters and `return` a string and should otherwise use code syntax covered in module 2. | \n\n## Program: fishstore()\ncreate and test fishstore()\n- **fishstore() takes 2 string arguments: fish & price**\n- **fishstore returns a string in sentence form** \n- **gather input for fish_entry and price_entry to use in calling fishstore()**\n- **print the return value of fishstore()**\n>example of output: **`Fish Type: Guppy costs $1`**"
9
-
},
10
-
{
11
-
"metadata": {
12
-
"trusted": false
13
-
},
14
-
"cell_type": "code",
15
-
"source": "# [ ] create, call and test fishstore() function \n# then PASTE THIS CODE into edX",
16
-
"execution_count": null,
17
-
"outputs": []
18
-
},
19
-
{
20
-
"metadata": {},
21
-
"cell_type": "markdown",
22
-
"source": "### Need assignment tips and clarification? \nSee the video on the \"End of Module coding assignment > Module 2 Required Code Description\" course page on [edX](https://courses.edx.org/courses/course-v1:Microsoft+DEV236x+4T2017/course) \n\n# Important: [How to submit the code in edX by pasting](https://courses.edx.org/courses/course-v1:Microsoft+DEV236x+1T2017/wiki/Microsoft.DEV236x.3T2018/paste-code-end-module-coding-assignments/)"
"This is an activity based on code similar to the Jupyter Notebook **`Practice_MOD02_1-3_IntroPy.ipynb`** which you may have completed.\n",
13
+
"\n",
14
+
"| Some Assignment Requirements | \n",
15
+
"|:-------------------------------| \n",
16
+
"| **NOTE:** This program requires a **function** be defined, created and called. The call will send values based on user input. The function call must capture a `return` value that is used in print output. The function will have parameters and `return` a string and should otherwise use code syntax covered in module 2. | \n",
17
+
"\n",
18
+
"## Program: fishstore()\n",
19
+
"create and test fishstore()\n",
20
+
"- **fishstore() takes 2 string arguments: fish & price**\n",
21
+
"- **fishstore returns a string in sentence form** \n",
22
+
"- **gather input for fish_entry and price_entry to use in calling fishstore()**\n",
23
+
"- **print the return value of fishstore()**\n",
24
+
">example of output: **`Fish Type: Guppy costs $1`**"
25
+
]
26
+
},
27
+
{
28
+
"metadata": {
29
+
"trusted": false
30
+
},
31
+
"cell_type": "code",
32
+
"source": [
33
+
"# [ ] create, call and test fishstore() function \n"
34
+
],
35
+
"execution_count": null,
36
+
"outputs": []
37
+
},
38
+
{
39
+
"metadata": {},
40
+
"cell_type": "markdown",
41
+
"source": [
42
+
"Submit this by creating a python file (.py) and submitting it in D2L. Be sure to test that it works."
0 commit comments