Skip to content

Commit

Permalink
Updated required codes to include names
Browse files Browse the repository at this point in the history
  • Loading branch information
dominict committed May 10, 2023
1 parent cedba42 commit fbd46fe
Show file tree
Hide file tree
Showing 30 changed files with 165 additions and 80 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"slideshow": {
Expand Down Expand Up @@ -43,7 +44,7 @@
"# Watch this video walkthrough as you work\n",
"## The big green circle play icon below links to a video walkthrough of this tutorial\n",
"When you see a video walkthrough in the tutorials, click on it and watch it as you work to have a guided lesson on how to complete the tasks and learn the materials. This walkthrough covers tasks 1-5.\n",
"[![view video](https://openclipart.org/download/219326/1432343177.svg)](https://youtu.be/iPU4aJEylEA)"
"[![view video](extras/green-play-button.svg)](https://youtu.be/iPU4aJEylEA)"
]
},
{
Expand Down Expand Up @@ -643,6 +644,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"slideshow": {
Expand All @@ -661,7 +663,7 @@
"license_plate = \"123A\" #license_plate initialized as a string\n",
"```\n",
"# Walkthrough video for tasks 6-12\n",
"[![view video](https://openclipart.org/download/219326/1432343177.svg)](https://youtu.be/y59XBWNTM_Y)\n",
"[![view video](extras/green-play-button.svg)](https://youtu.be/y59XBWNTM_Y)\n",
"\n",
"### Variables can start initialized as an Integer number data type \n",
">```python \n",
Expand Down Expand Up @@ -3352,7 +3354,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.8"
"version": "3.11.2"
}
},
"nbformat": 4,
Expand Down
30 changes: 15 additions & 15 deletions Python Absolute Beginner/Module_1.2_Required_Code.ipynb
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"# Module 1 Required Coding Activity \n",
"Work through the Module 1 Tutorials and Practices prior to attempting this activity.\n",
"Notice that this activity is logically very similar to the Allergy Check activity in the practice module.\n",
"Remmeber, you are not allowed to work with others on this code or post it in Teams for help.\n",
"You can ask related questions about the practice module.\n",
"\n",
"> **NOTE:** This program requires print output and code syntax used in module 1\n",
"\n",
Expand All @@ -16,15 +20,16 @@
"| **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",
"## Program: Name Check \n",
"\n",
"1. **[ ]** get user **`input`** for categories of food eaten in the last 24 hours \n",
"1. **[ ]** get user **`input`** for names of people met in the last 24 hours \n",
" save in a variable called **input_test** \n",
"2. **[ ]** print **`True`** if \"dairy\" is in the **input_test** string \n",
"2. **[ ]** print **`True`** if \"John\" is in the **input_test** string \n",
"3. **[ ]** Test the code so far \n",
"4. **[ ]** repeat the process checking the input for \"nuts\", **challenge** add \"Seafood\" and \"chocolate\" \n",
"4. **[ ]** repeat the process checking the input for your name, \n",
"5. **[ ] challenge:** add two more names \n",
"5. **[ ]** Test your code \n",
"6. **[ ] challenge:** make your code work for input regardless of case, e.g. - print **`True`** for \"Nuts\", \"NuTs\", \"NUTS\" or \"nuts\" \n"
"6. **[ ] challenge:** make your code work for input regardless of case, e.g. - print **`True`** for \"mary\", \"Mary\", \"MARY\" or \"MaRy\" \n"
]
},
{
Expand All @@ -35,27 +40,22 @@
},
"outputs": [],
"source": [
"# Create Allergy check code\n",
"# Create name check code\n",
"\n",
"# [ ] get input for input_test variable\n",
"\n",
"# [ ] print \"True\" message if \"dairy\" is in the input or False message if not\n",
"# [ ] print \"True\" message if \"John\" is in the input or False message if not\n",
"\n",
"\n",
"# [ ] print True message if \"nuts\" is in the input or False if not\n",
"# [ ] print True message if your name is in the input or False if not\n",
"\n",
"\n",
"# [ ] Challenge: Check if \"seafood\" is in the input - print message\n",
"# [ ] Challenge: Check if another person's name is in the input - print message\n",
"\n",
"\n",
"# [ ] Challenge: Check if \"chocolate\" is in the input - print message"
"# [ ] Challenge: Check if a fourth person's name is in the input - print message"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"## Calling Functions with Arguments: print() is a function built in to Python!\n",
"Functions are used for code tasks that are intended to be reused. For example, you have already used the print() function and passed it **arguments** by putting strings and variables into its parentheses. \n",
"\n",
"[![view video](https://openclipart.org/download/219326/1432343177.svg)](https://youtu.be/4mE3mL6oQX0)\n",
"[![view video](extras/green-play-button.svg)](https://youtu.be/4mE3mL6oQX0)\n",
"\n",
"Python allows us to create **User Defined Functions** and provides many **Built-in Functions** such as **`print()`** \n",
"- **`print()`** can be called using arguments (or without) and sends text to standard output, such as the console. \n",
Expand Down
5 changes: 4 additions & 1 deletion Python Absolute Beginner/Module_2.2_Required_Code.ipynb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"collapsed": true
Expand All @@ -18,7 +19,9 @@
"- **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`**"
"- **the final print statement must include your full name**\n",
"\n",
">example of output: **`Report for [YOUR FULL NAME GOES HERE]. Fish Type: Guppy costs $1`**"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
" - **`pass`** \n",
"## Watch the Walkthrough Video for this Notebook by Clicking Below\n",
" \n",
"[![view video](https://openclipart.org/download/219326/1432343177.svg)]( https://www.youtube.com/watch?v=ui9VZ9tmgyE)"
"[![view video](extras/green-play-button.svg)]( https://www.youtube.com/watch?v=ui9VZ9tmgyE)"
]
},
{
Expand Down
14 changes: 8 additions & 6 deletions Python Absolute Beginner/Module_3.2_Required_Code.ipynb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"collapsed": true
Expand All @@ -11,9 +12,10 @@
"\n",
"This is an activity based on code similar to the Jupyter Notebook **`Practice_MOD03_1-4_IntroPy.ipynb`** and **`Practice_MOD03_1-5_IntroPy.ipynb`** which you may have completed as practice.\n",
"\n",
"> **NOTE:** This program requires the use of **`if, elif, else`**, and casting between strings and numbers. The program should use the various code syntax covered in module 3. \n",
"> \n",
">This program requires the use of **`if, elif, else`**, and casting between strings and numbers. The program should use the various code syntax covered in module 3. \n",
"> \n",
">The program must result in print output using numeric input similar to that shown in the sample below.\n",
">You must include your full name in the input prompt. See sample input below for more detail.\n",
"\n",
"## Program: Cheese Order Function \n",
"- define function with max, min, price, and order_amount parameters\n",
Expand All @@ -29,17 +31,17 @@
"\n",
"Sample input and output:\n",
"```\n",
"Enter cheese order weight (numeric value): 113\n",
"[YOUR FULL NAME GOES HERE], enter cheese order weight (numeric value): 113\n",
"113.0 is more than currently available stock\n",
"```\n",
"\n",
"```\n",
"Enter cheese order weight (numeric value): .15\n",
"[YOUR FULL NAME GOES HERE], enter cheese order weight (numeric value): .15\n",
"0.15 is below minimum order amount\n",
"``` \n",
"\n",
"```\n",
"Enter cheese order weight (numeric value): 2\n",
"[YOUR FULL NAME GOES HERE], enter cheese order weight (numeric value): 2\n",
"2.0 costs $15.98\n",
"``` "
]
Expand All @@ -52,7 +54,7 @@
},
"outputs": [],
"source": [
"# [ ] create, call and test \n"
"# [ ] create fucntion, call and test \n"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"<font size=\"6\" color=\"#00A0B2\" face=\"verdana\"> <B>Concepts</B></font>\n",
"## nested conditionals\n",
"\n",
"[![view video](https://openclipart.org/download/219326/1432343177.svg)](https://youtu.be/BafLWo66zUE)\n",
"[![view video](extras/green-play-button.svg)](https://youtu.be/BafLWo66zUE)\n",
"\n",
"### Making a sandwich\n",
"Taking a sandwich order starts with sandwich choices:\n",
Expand Down
53 changes: 26 additions & 27 deletions Python Absolute Beginner/Module_4.2_Required_Code.ipynb
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"cell_type": "markdown",
"source": [
"# Module 4 Required Coding Activity \n",
"Introduction to Python Unit 1 \n",
Expand All @@ -13,7 +14,7 @@
"\n",
"| Some Assignment Requirements |\n",
"|:-------------------------------|\n",
"|This program requires the use of<ul><li>**`while`** loop to get non-empty input</li><li>**`if, else`**</li><li>**`if, else`** (nested)</li><li>**`.isdigit()`** check for integer only input</li><li>**`.isalpha()`** check for alphabetic only input</li></ul><br/>The program should **only** use code syntax covered in modules 1 - 4.<br/><br/>The program must result in printed message analysis of the input. |\n",
"|This program requires the use of<ul><li>**`while`** loop to get non-empty input</li><li>**`if, else`**</li><li>**`if, else`** (nested)</li><li>**`.isdigit()`** check for integer only input</li><li>**`.isalpha()`** check for alphabetic only input</li></ul><br/>The program should **only** use code syntax covered in modules 1 - 4.<br/><br/>The program must result in printed message analysis of the input. Be sure to include your full name in the input prompt. See the sample input for more detail. |\n",
"\n",
"\n",
" \n",
Expand All @@ -34,37 +35,35 @@
"#### Sample input and output: \n",
"enter nothing (twice) then enter a word \n",
"```\n",
"enter word or integer: \n",
"enter word or integer: \n",
"enter word or integer: Hello\n",
"[YOUR FULL NAME GOES HERE], enter word or integer: \n",
"[YOUR FULL NAME GOES HERE], enter word or integer: \n",
"[YOUR FULL NAME GOES HERE], enter word or integer: Hello\n",
"\"Hello\" is all alphabetical characters!\n",
" \n",
"``` \n",
"----- \n",
" \n",
"alphabetical word input \n",
"```\n",
"enter word or integer: carbonization\n",
"[YOUR FULL NAME GOES HERE], enter word or integer: carbonization\n",
"\"carbonization\" is all alphabetical characters!\n",
" \n",
"``` \n",
"----- \n",
" \n",
"numeric inputs\n",
"```\n",
"enter word or integer: 30\n",
"[YOUR FULL NAME GOES HERE], enter word or integer: 30\n",
"30 is a smaller number than expected\n",
"\n",
"enter word or integer: 1024\n",
"[YOUR FULL NAME GOES HERE], enter word or integer: 1024\n",
"1024 is a pretty big number\n",
"``` \n",
"----- \n",
"\n",
"\n",
"### loop until non-empty input is submitted \n",
"This diagram represents the input part of the assignment - it is the loop to keep prompting the user for input until they submit some input (non-empty). \n",
"\n",
"![image of while Loop with nested if statements described in bulleted text above](https://iajupyterprodblobs.blob.core.windows.net/imagecontainer/input_loop_sketch.png) \n",
"### Loop until non-empty input is submitted \n",
"In the input part of the assignment keep prompting the user for input until they submit some input (non-empty). \n",
"\n",
"Once the user gives input with characters use the input in calling the str_analysis() function.\n",
"\n",
Expand All @@ -83,47 +82,47 @@
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"trusted": false
},
"cell_type": "code",
"outputs": [],
"source": [
"# [ ] create, call and test the str_analysis() function \n",
"\n",
"\n",
"\n",
"\n"
],
"execution_count": null,
"outputs": []
]
},
{
"metadata": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"Submit this by creating a python file (.py) and submitting it in D2L. Be sure to test that it works."
]
}
],
"metadata": {
"kernelspec": {
"name": "python3",
"display_name": "Python 3",
"language": "python"
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"nbconvert_exporter": "python",
"name": "python",
"file_extension": ".py",
"version": "3.5.4",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"codemirror_mode": {
"version": 3,
"name": "ipython"
}
"version": "3.5.4"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
}
15 changes: 12 additions & 3 deletions Python Absolute Beginner/Module_5_Required_FINAL_Project.ipynb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"collapsed": true
Expand All @@ -11,9 +12,15 @@
"\n",
"Complete all tutorials, practices and required code in the course prior to attempting this activity.\n",
"\n",
"| Some Assignment Requirements |\n",
"|:-------------------------------|\n",
"|This program requires the use of<ul><li>**`while`** loop</li><li>**`if, elif, else`**</li><li>**`if,else`** (nested)</li><li>**casting** of type, between strings and numbers</li></ul><br/>The program should **only** use code syntax covered in modules 1 - 4.<br/><br/>The program must result in print output using the numeric input, similar to that shown in the samples displaying \"Items\" and \"Total\". |\n",
"**This program requires the use of:**\n",
"<ul>\n",
"<li>functional programming: write and call a function</li>\n",
"<li>**`while`** loop</li>\n",
"<li>**`if, elif, else`**</li>\n",
"<li>**`if,else`** (nested)</li>\n",
"<li>**casting** of type, between strings and numbers</li></ul>\n",
"<br/>The program should **only** use code syntax covered in modules 1 - 4.<br/>\n",
"<br/>The program must result in print output using the numeric input, similar to that shown in the samples displaying \"Items\" and \"Total\". If must also have a statement after the Total row indicating who made the calculation. This name must be your full name. See the sample output for clarity.\n",
"\n",
"\n",
"## Program: `adding_report()` function \n",
Expand Down Expand Up @@ -44,6 +51,7 @@
"\n",
"Total\n",
" 111\n",
" Calculated by: [YOUR FULL NAME GOES HERE]\n",
"``` \n",
"\n",
"call with \"T\"(print only the total) \n",
Expand All @@ -55,6 +63,7 @@
"\n",
"Total\n",
" 12\n",
" Calculated by: [YOUR FULL NAME GOES HERE]\n",
"``` \n",
"\n",
"\n",
Expand Down
File renamed without changes.
11 changes: 11 additions & 0 deletions Python Absolute Beginner/extras/green-play-button.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit fbd46fe

Please sign in to comment.