Skip to content

Commit 9fc22a7

Browse files
committed
none
1 parent 652dead commit 9fc22a7

26 files changed

Lines changed: 1589 additions & 880 deletions

content/lessons/01/Now-You-Code/NYC1-walkthrough.ipynb

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"collapsed": true
2525
},
2626
"source": [
27-
"## Problem Analysis\n",
27+
"## Step 1: Problem Analysis\n",
2828
"\n",
2929
"Inputs:\n",
3030
"\n",
@@ -36,26 +36,39 @@
3636
},
3737
{
3838
"cell_type": "code",
39-
"execution_count": null,
39+
"execution_count": 2,
4040
"metadata": {
4141
"collapsed": true
4242
},
4343
"outputs": [],
4444
"source": [
45-
"# write code here\n"
45+
"# Step 2: write code here\n"
46+
]
47+
},
48+
{
49+
"cell_type": "markdown",
50+
"metadata": {
51+
"collapsed": true
52+
},
53+
"source": [
54+
"## Step 3: Questions\n",
55+
"\n",
56+
"1. What happens when you enter `TWO` instead of `2` for the number of people dining? or $60 as the amount of the check, instead of 60?\n",
57+
"2. Why do you think this happens?\n",
58+
"3. Explain what happens when you enter `0.5` for the number of people dining?\n"
4659
]
4760
},
4861
{
4962
"cell_type": "markdown",
5063
"metadata": {},
5164
"source": [
52-
"## Evaluation Criteria\n",
65+
"## Reminder of Evaluation Criteria\n",
5366
"\n",
54-
"1. What the problem attempted?\n",
55-
"2. What the problem analysis thought out?\n",
56-
"3. Does the code execute?\n",
57-
"4. Does the code solve the problem?\n",
58-
"5. Is the code well written? (easy to understand, modular, and self-documenting)\n"
67+
"1. What the problem attempted (analysis, code, and answered questions) ?\n",
68+
"2. What the problem analysis thought out? (does the program match the plan?)\n",
69+
"3. Does the code execute without syntax error?\n",
70+
"4. Does the code solve the intended problem?\n",
71+
"5. Is the code well written? (easy to understand, modular, and self-documenting, handles errors)\n"
5972
]
6073
},
6174
{

content/lessons/02/Now-You-Code/NYC1-Hello-2-Ways.ipynb

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,57 @@
1616
"```\n"
1717
]
1818
},
19+
{
20+
"cell_type": "markdown",
21+
"metadata": {
22+
"collapsed": true
23+
},
24+
"source": [
25+
"## Step 1: Problem Analysis\n",
26+
"\n",
27+
"Inputs:\n",
28+
"\n",
29+
"Outputs:\n",
30+
"\n",
31+
"Algorithm (Steps in Program):\n",
32+
"\n"
33+
]
34+
},
35+
{
36+
"cell_type": "code",
37+
"execution_count": null,
38+
"metadata": {
39+
"collapsed": true
40+
},
41+
"outputs": [],
42+
"source": [
43+
"# Step 2: Write code here\n"
44+
]
45+
},
46+
{
47+
"cell_type": "markdown",
48+
"metadata": {},
49+
"source": [
50+
"## Step 3: Questions\n",
51+
"\n",
52+
"1. What happens when don't follow the instructions and enter your first name as your last name? Does the code still run? Why?\n",
53+
"2. What type of error it when the program runs but does not handle bad input?\n",
54+
"3. Is there anything you can do in code to correct this type of error? Why or why not?"
55+
]
56+
},
57+
{
58+
"cell_type": "markdown",
59+
"metadata": {},
60+
"source": [
61+
"## Reminder of Evaluation Criteria\n",
62+
"\n",
63+
"1. What the problem attempted (analysis, code, and answered questions) ?\n",
64+
"2. What the problem analysis thought out? (does the program match the plan?)\n",
65+
"3. Does the code execute without syntax error?\n",
66+
"4. Does the code solve the intended problem?\n",
67+
"5. Is the code well written? (easy to understand, modular, and self-documenting, handles errors)\n"
68+
]
69+
},
1970
{
2071
"cell_type": "code",
2172
"execution_count": null,

content/lessons/02/Now-You-Code/NYC2-Indigo-Montoya.ipynb

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# Now You Code 1: Indigo Montoya\n",
7+
"# Now You Code 2: Indigo Montoya\n",
88
"\n",
99
"[The Pricess Bride](https://www.rottentomatoes.com/m/princess_bride/) is an adventure film from the 80's, a true cult classic. One of the many notable scenes involves a character Indigo Montoya who explains his character's motivation for revenge through the catch-phase:\n",
1010
"\n",
@@ -21,6 +21,56 @@
2121
"\"Hello. My name is Mike Fudge. You Tickled my Uncle. Prepare to die!\"\n"
2222
]
2323
},
24+
{
25+
"cell_type": "markdown",
26+
"metadata": {
27+
"collapsed": true
28+
},
29+
"source": [
30+
"## Step 1: Problem Analysis\n",
31+
"\n",
32+
"Inputs:\n",
33+
"\n",
34+
"Outputs:\n",
35+
"\n",
36+
"Algorithm (Steps in Program):"
37+
]
38+
},
39+
{
40+
"cell_type": "code",
41+
"execution_count": 4,
42+
"metadata": {
43+
"collapsed": false
44+
},
45+
"outputs": [],
46+
"source": [
47+
"# Step 2: Write code here\n"
48+
]
49+
},
50+
{
51+
"cell_type": "markdown",
52+
"metadata": {},
53+
"source": [
54+
"## Step 3: Questions\n",
55+
"\n",
56+
"1. What happens when neglect the instructions and enter a past-tense action instead of a name? Does the code still run? Why?\n",
57+
"2. What type of error it when the program runs but does not handle bad input?\n",
58+
"3. Is there anything you can do in code to correct this type of error? Why or why not?"
59+
]
60+
},
61+
{
62+
"cell_type": "markdown",
63+
"metadata": {},
64+
"source": [
65+
"## Reminder of Evaluation Criteria\n",
66+
"\n",
67+
"1. What the problem attempted (analysis, code, and answered questions) ?\n",
68+
"2. What the problem analysis thought out? (does the program match the plan?)\n",
69+
"3. Does the code execute without syntax error?\n",
70+
"4. Does the code solve the intended problem?\n",
71+
"5. Is the code well written? (easy to understand, modular, and self-documenting, handles errors)\n"
72+
]
73+
},
2474
{
2575
"cell_type": "code",
2676
"execution_count": null,

content/lessons/03/Now-You-Code/NYC1-Check-Splitter.ipynb

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,58 @@
1515
"Each person owes: $16.67\n",
1616
"```\n",
1717
"\n",
18-
"NOTE: Use string formatters to display the output to two decimal places.\n",
18+
"NOTE: Use string formatters to display the output to two decimal places.\n"
19+
]
20+
},
21+
{
22+
"cell_type": "markdown",
23+
"metadata": {
24+
"collapsed": true
25+
},
26+
"source": [
27+
"## Step 1: Problem Analysis\n",
28+
"\n",
29+
"Inputs:\n",
1930
"\n",
31+
"Outputs:\n",
2032
"\n",
21-
"Start out your program by writing your TODO list of steps you'll need to solve the problems."
33+
"Algorithm (Steps in Program):\n",
34+
"\n"
2235
]
2336
},
2437
{
2538
"cell_type": "code",
26-
"execution_count": null,
39+
"execution_count": 1,
2740
"metadata": {
2841
"collapsed": true
2942
},
3043
"outputs": [],
3144
"source": [
32-
"#TODO List here:\n"
45+
"# Step 2: Write code here\n"
46+
]
47+
},
48+
{
49+
"cell_type": "markdown",
50+
"metadata": {},
51+
"source": [
52+
"## Step 3: Questions\n",
53+
"\n",
54+
"1. What happens when you enter `TWO` instead of `2` for the number of people dining? or $60 as the amount of the check, instead of 60?\n",
55+
"2. What type of error is this? Do you think it can be handled in code?\n",
56+
"3. Explain what happens when you enter `0.5` for the number of people dining? Does the program run? Does it make sense? \n"
57+
]
58+
},
59+
{
60+
"cell_type": "markdown",
61+
"metadata": {},
62+
"source": [
63+
"## Reminder of Evaluation Criteria\n",
64+
"\n",
65+
"1. What the problem attempted (analysis, code, and answered questions) ?\n",
66+
"2. What the problem analysis thought out? (does the program match the plan?)\n",
67+
"3. Does the code execute without syntax error?\n",
68+
"4. Does the code solve the intended problem?\n",
69+
"5. Is the code well written? (easy to understand, modular, and self-documenting, handles errors)\n"
3370
]
3471
},
3572
{
@@ -39,9 +76,7 @@
3976
"collapsed": true
4077
},
4178
"outputs": [],
42-
"source": [
43-
"# Code here\n"
44-
]
79+
"source": []
4580
}
4681
],
4782
"metadata": {

content/lessons/03/Now-You-Code/NYC2-House-Depot-Paint-Estimator.ipynb

Lines changed: 47 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,34 +29,71 @@
2929
"Total gallons of paint requried: 2\n",
3030
"```\n",
3131
"\n",
32-
"HINT: Use the `math.ceil()` function to round your number of gallons up to the nearest whole number \n",
32+
"HINT: Use the `math.ceil()` function to round your number of gallons up to the nearest whole number \n"
33+
]
34+
},
35+
{
36+
"cell_type": "markdown",
37+
"metadata": {
38+
"collapsed": false
39+
},
40+
"source": [
41+
"## Step 1: Problem Analysis\n",
42+
"\n",
43+
"Inputs:\n",
3344
"\n",
45+
"Outputs:\n",
3446
"\n",
35-
"**Start out your program by writing your TODO list of steps you'll need to solve the problems.**\n"
47+
"Algorithm (Steps in Program):\n",
48+
"\n",
49+
"\n"
3650
]
3751
},
3852
{
3953
"cell_type": "code",
40-
"execution_count": 3,
54+
"execution_count": 1,
4155
"metadata": {
4256
"collapsed": false
4357
},
4458
"outputs": [],
4559
"source": [
46-
"# To-Do list here\n"
60+
"import math # you need this to use math.ceil(), so we wrote this part of the code for you!!! LEAVE IT HERE!\n",
61+
"# Step 2: write code here\n",
62+
"\n"
63+
]
64+
},
65+
{
66+
"cell_type": "markdown",
67+
"metadata": {},
68+
"source": [
69+
"## Step 3: Questions\n",
70+
"\n",
71+
"1. Why does the program still run when you enter a negative number for length?\n",
72+
"2. Does the output make sense when you enter a negative length? Why type of error is this?\n",
73+
"3. Why do we use `math.ceil()` in this program? In other words are you allowed to buy 3.75 gallons of paint?\n"
74+
]
75+
},
76+
{
77+
"cell_type": "markdown",
78+
"metadata": {},
79+
"source": [
80+
"## Reminder of Evaluation Criteria\n",
81+
"\n",
82+
"1. What the problem attempted (analysis, code, and answered questions) ?\n",
83+
"2. What the problem analysis thought out? (does the program match the plan?)\n",
84+
"3. Does the code execute without syntax error?\n",
85+
"4. Does the code solve the intended problem?\n",
86+
"5. Is the code well written? (easy to understand, modular, and self-documenting, handles errors)\n"
4787
]
4888
},
4989
{
5090
"cell_type": "code",
51-
"execution_count": 8,
91+
"execution_count": null,
5292
"metadata": {
53-
"collapsed": false
93+
"collapsed": true
5494
},
5595
"outputs": [],
56-
"source": [
57-
"import math # you need this to use math.ceil() \n",
58-
"# Code Here\n"
59-
]
96+
"source": []
6097
}
6198
],
6299
"metadata": {

0 commit comments

Comments
 (0)