|
34 | 34 | "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" |
35 | 35 | ] |
36 | 36 | }, |
| 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 | + }, |
37 | 50 | { |
38 | 51 | "cell_type": "code", |
39 | 52 | "execution_count": null, |
|
42 | 55 | "source": [ |
43 | 56 | "# Doing the imports for you\n", |
44 | 57 | "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" |
48 | 59 | ] |
49 | 60 | }, |
50 | 61 | { |
|
156 | 167 | "\n", |
157 | 168 | "my_list_of_file_names = []\n", |
158 | 169 | "\n", |
| 170 | + "# Do NOT re-use the variable name new_file_name here, btw. Pick a different name\n", |
| 171 | + "\n", |
159 | 172 | "# 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", |
161 | 174 | "# HINT 3: I recommend building the string and then appending it (use two lines) rather than doing it in one fell swoop \n", |
162 | 175 | "# (easier to debug)\n", |
163 | 176 | "...\n", |
|
213 | 226 | "# You can either create the dictionary all at once or just add each key-value pair in turn\n", |
214 | 227 | "my_simple_dict = {}\n", |
215 | 228 | "\n", |
| 229 | + "# Remember that string comparison is case-sensitive\n", |
216 | 230 | "assert my_simple_dict[\"name\"] == \"Me\"\n", |
217 | 231 | "assert my_simple_dict[\"age\"] == 10\n", |
218 | 232 | "assert len(my_simple_dict[\"grades\"]) == 3\n", |
|
0 commit comments