Skip to content

Commit b808d65

Browse files
committed
Last Update: 2020-07-16 10:42
1 parent 8c26aa8 commit b808d65

35 files changed

+13336
-47
lines changed

content/lessons/01/Class-Coding-Lab/CCL-Intro-To-Python-Programming.ipynb

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,6 @@
1616
"6. the input() function for input and print() function for output\n"
1717
]
1818
},
19-
{
20-
"cell_type": "markdown",
21-
"metadata": {},
22-
"source": [
23-
"After you link the notebook to the assignment, you can run `ok.submit()` to save your work to the OK System. You are welcome to do this multiple times, as the most recent submission will be graded. \n",
24-
"\n",
25-
"Try this now:"
26-
]
27-
},
28-
{
29-
"cell_type": "code",
30-
"execution_count": null,
31-
"metadata": {},
32-
"outputs": [],
33-
"source": [
34-
"ok.submit()"
35-
]
36-
},
3719
{
3820
"cell_type": "markdown",
3921
"metadata": {},
@@ -448,7 +430,11 @@
448430
"source": [
449431
"## How Do I hand in my Work?\n",
450432
"\n",
451-
"Handing in your Homework and Labs is easy! All you need to do is run the code cell below and follow the directions."
433+
"FIRST AND FOREMOST: **Save Your work!** Yes, it auto-saves, but you should get in the habit of saving before submitting. From the menu, choose File --> Save Notebook. Or you can use the shortcut keys `CTRL+S`\n",
434+
"\n",
435+
"Handing in your Homework and Labs is easy! All you need to do is run the code cell below and follow the directions. This code sends your assignment to a private cloud where your instructor can download a copy of it at the time of submission. \n",
436+
"\n",
437+
"Once the assignment is graded, you will see a grade and feedback / comments in Blackboard.\n"
452438
]
453439
},
454440
{

content/lessons/02/Class-Coding-Lab/CCL-Variables-And-Types.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@
373373
"metadata": {},
374374
"outputs": [],
375375
"source": [
376+
"# SAVE YOUR WORK FIRST! CTRL+S\n",
376377
"# RUN THIS CODE CELL TO TURN IN YOUR WORK!\n",
377378
"from ist256.submission import Submission\n",
378379
"Submission().submit()"
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# Now You Code 3: Distance Conversions\n",
8+
"\n",
9+
"\n",
10+
"Write a Python program to enter a distance in feet then convert that\n",
11+
"distance to yards and miles. \n",
12+
"\n",
13+
"For example:\n",
14+
"\n",
15+
" Enter distance in FEET:15000\n",
16+
" That's 5000.0 yards or 2.8 miles.\n",
17+
"\n",
18+
"NOTES:\n",
19+
" - Research the converion formulas on your own.\n",
20+
" - Format float variable output to one decimal place\n"
21+
]
22+
},
23+
{
24+
"cell_type": "markdown",
25+
"metadata": {},
26+
"source": [
27+
"## Step 1: Problem Analysis\n",
28+
"\n",
29+
"Inputs:\n",
30+
"\n",
31+
"Outputs:\n",
32+
"\n",
33+
"Algorithm (Steps in Program):\n",
34+
"\n",
35+
"\n"
36+
]
37+
},
38+
{
39+
"cell_type": "code",
40+
"execution_count": 1,
41+
"metadata": {},
42+
"outputs": [],
43+
"source": [
44+
"# Step 2: write code here\n",
45+
"\n"
46+
]
47+
},
48+
{
49+
"cell_type": "markdown",
50+
"metadata": {},
51+
"source": [
52+
"## Step 3: Questions\n",
53+
"\n",
54+
"1. What is the format code to output the distance with no decimal places?\n",
55+
"\n",
56+
"Answer: \n",
57+
"\n",
58+
"\n",
59+
"2. Does the output make sense when you enter a negative distanct in feet? Why or why not?\n",
60+
"\n",
61+
"Answer: \n",
62+
"\n",
63+
"\n",
64+
"3. Did you store your conversions in variables? I argue this makes your program more readable. Why?\n",
65+
"\n",
66+
"Answer: \n",
67+
"\n",
68+
"\n"
69+
]
70+
},
71+
{
72+
"cell_type": "markdown",
73+
"metadata": {},
74+
"source": [
75+
"## Step 4: Reflection\n",
76+
"\n",
77+
"Reflect upon your experience completing this assignment. This should be a personal narrative, in your own voice, and cite specifics relevant to the activity as to help the grader understand how you arrived at the code you submitted. Things to consider touching upon: Elaborate on the process itself. Did your original problem analysis work as designed? How many iterations did you go through before you arrived at the solution? Where did you struggle along the way and how did you overcome it? What did you learn from completing the assignment? What do you need to work on to get better? What was most valuable and least valuable about this exercise? Do you have any suggestions for improvements?\n",
78+
"\n",
79+
"To make a good reflection, you should journal your thoughts, questions and comments while you complete the exercise.\n",
80+
"\n",
81+
"Keep your response to between 100 and 250 words.\n",
82+
"\n",
83+
"`--== Double-Click and Write Your Reflection Below Here ==--`\n",
84+
"\n"
85+
]
86+
}
87+
],
88+
"metadata": {
89+
"anaconda-cloud": {},
90+
"kernelspec": {
91+
"display_name": "Python 3",
92+
"language": "python",
93+
"name": "python3"
94+
},
95+
"language_info": {
96+
"codemirror_mode": {
97+
"name": "ipython",
98+
"version": 3
99+
},
100+
"file_extension": ".py",
101+
"mimetype": "text/x-python",
102+
"name": "python",
103+
"nbconvert_exporter": "python",
104+
"pygments_lexer": "ipython3",
105+
"version": "3.8.2"
106+
},
107+
"toc": {
108+
"base_numbering": 1,
109+
"nav_menu": {},
110+
"number_sections": false,
111+
"sideBar": false,
112+
"skip_h1_title": false,
113+
"title_cell": "Table of Contents",
114+
"title_sidebar": "Contents",
115+
"toc_cell": false,
116+
"toc_position": {},
117+
"toc_section_display": false,
118+
"toc_window_display": false
119+
}
120+
},
121+
"nbformat": 4,
122+
"nbformat_minor": 4
123+
}

content/lessons/02/Now-You-Code/NYC5-Smore-O-Matic.ipynb

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,18 @@
8888
"\n",
8989
"Keep your response to between 100 and 250 words.\n",
9090
"\n",
91-
"`--== Write Your Reflection Below Here ==--`\n",
92-
"\n"
91+
"`--== Double-Click and Write Your Reflection Below Here ==--`\n"
92+
]
93+
},
94+
{
95+
"cell_type": "code",
96+
"execution_count": null,
97+
"metadata": {},
98+
"outputs": [],
99+
"source": [
100+
"# RUN THIS CODE CELL TO TURN IN YOUR WORK!\n",
101+
"from ist256.submission import Submission\n",
102+
"Submission().submit()"
93103
]
94104
}
95105
],
@@ -110,7 +120,7 @@
110120
"name": "python",
111121
"nbconvert_exporter": "python",
112122
"pygments_lexer": "ipython3",
113-
"version": "3.6.6"
123+
"version": "3.8.2"
114124
},
115125
"toc": {
116126
"base_numbering": 1,
@@ -127,5 +137,5 @@
127137
}
128138
},
129139
"nbformat": 4,
130-
"nbformat_minor": 1
140+
"nbformat_minor": 4
131141
}

content/lessons/03/Class-Coding-Lab/CCL-Conditionals.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@
385385
"metadata": {},
386386
"outputs": [],
387387
"source": [
388+
"# SAVE YOUR WORK FIRST! CTRL+S\n",
388389
"# RUN THIS CODE CELL TO TURN IN YOUR WORK!\n",
389390
"from ist256.submission import Submission\n",
390391
"Submission().submit()"
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {},
7+
"outputs": [],
8+
"source": [
9+
"# run this code to login to https://okpy.org/ and setup the assignment for submission\n",
10+
"from ist256 import okclient\n",
11+
"ok = okclient.Homework()"
12+
]
13+
},
14+
{
15+
"cell_type": "markdown",
16+
"metadata": {},
17+
"source": [
18+
"# Now You Code 2: Paint Pricing\n",
19+
"\n",
20+
"House Depot, a big-box hardware retailer, has contracted you to create an app to calculate paint prices. \n",
21+
"\n",
22+
"The price of paint is determined by the following factors:\n",
23+
"- Everyday quality paint is `$19.99` per gallon.\n",
24+
"- Select quality paint is `$24.99` per gallon.\n",
25+
"- Premium quality paint is `$32.99` per gallon.\n",
26+
"\n",
27+
"In addition if the customer wants computerized color-matching that incurs an additional fee of `$4.99` per gallon. \n",
28+
"\n",
29+
"Write a program to ask the user to select a paint quality: 'everyday', 'select' or 'premium', prompt for color matching, and then outputs the price per gallon of the paint.\n",
30+
"\n",
31+
"Example Run 1:\n",
32+
"\n",
33+
"```\n",
34+
"Which paint quality do you require ['everyday', 'select', 'premium'] ?select\n",
35+
"Do you require color matching [y/n] ?y\n",
36+
"Total price of select paint with color matching is $29.98\n",
37+
"```\n",
38+
"\n",
39+
"Example Run 2:\n",
40+
"\n",
41+
"```\n",
42+
"Which paint quality do you require ['everyday', 'select', 'premium'] ?premium\n",
43+
"Do you require color matching [y/n] ?n\n",
44+
"Total price of premium paint without color matching is $32.99\n",
45+
"```"
46+
]
47+
},
48+
{
49+
"cell_type": "markdown",
50+
"metadata": {
51+
"collapsed": true
52+
},
53+
"source": [
54+
"## Step 1: Problem Analysis\n",
55+
"\n",
56+
"Inputs:\n",
57+
"\n",
58+
"Outputs:\n",
59+
"\n",
60+
"Algorithm (Steps in Program):\n",
61+
"\n"
62+
]
63+
},
64+
{
65+
"cell_type": "code",
66+
"execution_count": 1,
67+
"metadata": {},
68+
"outputs": [],
69+
"source": [
70+
"# Step 2: Write code here\n",
71+
"\n"
72+
]
73+
},
74+
{
75+
"cell_type": "markdown",
76+
"metadata": {},
77+
"source": [
78+
"## Step 3: Questions\n",
79+
"\n",
80+
"1. When you enter something other than `'everyday', 'select',` or `'premium'` what happens? Modify the program to print `that is not a paint quality` and then exit in those cases.\n",
81+
"\n",
82+
"Answer: \n",
83+
"\n",
84+
"\n",
85+
"2. What happens when you enter something other than `'y'` or `'n'` for color matching? Re-write the program to print `you must enter y or n` whenever you enter something other than those two values.\n",
86+
"\n",
87+
"Answer: \n",
88+
"\n",
89+
"\n",
90+
"3. Why can't we use Python's `try...except` in this example?\n",
91+
"\n",
92+
"Answer: \n",
93+
"\n",
94+
"\n",
95+
"4. How many times (at minimum) must we execute this program and check the results before we can be reasonably assured it is correct?\n",
96+
"\n",
97+
"Answer: \n",
98+
"\n",
99+
"\n"
100+
]
101+
},
102+
{
103+
"cell_type": "markdown",
104+
"metadata": {},
105+
"source": [
106+
"## Step 4: Reflection\n",
107+
"\n",
108+
"Reflect upon your experience completing this assignment. This should be a personal narrative, in your own voice, and cite specifics relevant to the activity as to help the grader understand how you arrived at the code you submitted. Things to consider touching upon: Elaborate on the process itself. Did your original problem analysis work as designed? How many iterations did you go through before you arrived at the solution? Where did you struggle along the way and how did you overcome it? What did you learn from completing the assignment? What do you need to work on to get better? What was most valuable and least valuable about this exercise? Do you have any suggestions for improvements?\n",
109+
"\n",
110+
"To make a good reflection, you should journal your thoughts, questions and comments while you complete the exercise.\n",
111+
"\n",
112+
"Keep your response to between 100 and 250 words.\n",
113+
"\n",
114+
"`--== Write Your Reflection Below Here ==--`\n",
115+
"\n"
116+
]
117+
},
118+
{
119+
"cell_type": "code",
120+
"execution_count": null,
121+
"metadata": {},
122+
"outputs": [],
123+
"source": [
124+
"# to save and turn in your work, execute this cell. Your latest submission will be graded. \n",
125+
"ok.submit()"
126+
]
127+
}
128+
],
129+
"metadata": {
130+
"anaconda-cloud": {},
131+
"kernelspec": {
132+
"display_name": "Python 3",
133+
"language": "python",
134+
"name": "python3"
135+
},
136+
"language_info": {
137+
"codemirror_mode": {
138+
"name": "ipython",
139+
"version": 3
140+
},
141+
"file_extension": ".py",
142+
"mimetype": "text/x-python",
143+
"name": "python",
144+
"nbconvert_exporter": "python",
145+
"pygments_lexer": "ipython3",
146+
"version": "3.6.6"
147+
},
148+
"toc": {
149+
"base_numbering": 1,
150+
"nav_menu": {},
151+
"number_sections": false,
152+
"sideBar": false,
153+
"skip_h1_title": false,
154+
"title_cell": "Table of Contents",
155+
"title_sidebar": "Contents",
156+
"toc_cell": false,
157+
"toc_position": {},
158+
"toc_section_display": false,
159+
"toc_window_display": false
160+
}
161+
},
162+
"nbformat": 4,
163+
"nbformat_minor": 1
164+
}

content/lessons/04/Class-Coding-Lab/CCL-Iterations.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@
272272
"metadata": {},
273273
"outputs": [],
274274
"source": [
275+
"# SAVE YOUR WORK FIRST! CTRL+S\n",
275276
"# RUN THIS CODE CELL TO TURN IN YOUR WORK!\n",
276277
"from ist256.submission import Submission\n",
277278
"Submission().submit()"

0 commit comments

Comments
 (0)