Skip to content

Commit b87f43b

Browse files
committed
Moving pip install of otter-grader to intro assignment
1 parent 1c746a6 commit b87f43b

2 files changed

Lines changed: 19 additions & 5 deletions

File tree

‎Week_0_python/Intro_assignment.ipynb‎

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,19 @@
3434
"There's usually a lot of supplied code/instructions. Anything you're suppose to change is labeled with \"TODO\". When in doubt, look to see what the autograder is checking for.\n"
3535
]
3636
},
37+
{
38+
"cell_type": "code",
39+
"execution_count": null,
40+
"metadata": {},
41+
"outputs": [],
42+
"source": [
43+
"# Safety check - if you did not install numpy or otter-grader correctly this should do it for you\n",
44+
"# If you have installed everything already, it should spit out a bunch of \"requirement already satisfied\" messages\n",
45+
"import sys\n",
46+
"!{sys.executable} -m pip install numpy\n",
47+
"!{sys.executable} -m pip install otter-grader"
48+
]
49+
},
3750
{
3851
"cell_type": "code",
3952
"execution_count": null,
@@ -42,9 +55,7 @@
4255
"source": [
4356
"# Doing the imports for you\n",
4457
"import numpy as np\n",
45-
"import json as json\n",
46-
"from scipy.stats import linregress\n",
47-
"import matplotlib.pyplot as plt"
58+
"import json as json"
4859
]
4960
},
5061
{
@@ -156,8 +167,10 @@
156167
"\n",
157168
"my_list_of_file_names = []\n",
158169
"\n",
170+
"# Do NOT re-use the variable name new_file_name here, btw. Pick a different name\n",
171+
"\n",
159172
"# HINT 1: You'll want the function range() for the for loop\n",
160-
"# HINT 2: You can eithre have range go from 1 to 3 OR have range go from 0 to 2 and just add one when you create the string\n",
173+
"# HINT 2: You can either have range go from 1 to 3 OR have range go from 0 to 2 and just add one when you create the string\n",
161174
"# HINT 3: I recommend building the string and then appending it (use two lines) rather than doing it in one fell swoop \n",
162175
"# (easier to debug)\n",
163176
"...\n",
@@ -213,6 +226,7 @@
213226
"# You can either create the dictionary all at once or just add each key-value pair in turn\n",
214227
"my_simple_dict = {}\n",
215228
"\n",
229+
"# Remember that string comparison is case-sensitive\n",
216230
"assert my_simple_dict[\"name\"] == \"Me\"\n",
217231
"assert my_simple_dict[\"age\"] == 10\n",
218232
"assert len(my_simple_dict[\"grades\"]) == 3\n",

‎Week_1_data_structures/lec_act_1_data_structures.ipynb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@
344344
"source": [
345345
"# Data for this problem - this takes the list and converts it to a numpy array\n",
346346
"# Use the variable window (click on variables above) to see the difference between test_list_one and\n",
347-
"# test_nparra - they should have the same values, they're just stored differently\n",
347+
"# test_nparray - they should have the same values, they're just stored differently\n",
348348
"test_nparray = np.array(test_list_one)"
349349
]
350350
},

0 commit comments

Comments
 (0)