This question will walk you through the process of how a coding assignment in JupyterHub will work. In the following parts, you'll edit the sections of code needed to pass the autograder.
For each part below, you'll notice there's a cell with one line of Python, starting with the word raise. Delete this line, and in its place, put the code that answers the prompt.
Below that cell, you'll find another cell with multiple lines of Python, starting with try:. DO NOT EDIT THIS CELL. This is the autograder. For future reference, JupyterHub knows what the autograder code is before you download the assignment, so even if you edit the autograder so your code passes its tests, the edits will be removed when you submit the assignment. So you can't cheat that way :)
HINT: Every time you fill in code to answer a question, you can immediately test that code by selecting the cell and pressing the "Run Cell" button in the menu (looks like a Play icon). After you run the cell with your code, repeat this process with the autograder cell(s) below it. Provided there aren't any errors, your code worked correctly! If there are errors, go back and edit your code and repeat this process.
In [ ]:
In [ ]:
assert x == 3
In [ ]:
In [ ]:
assert x == 3.14159
In [ ]:
In [ ]:
assert y == 10
In [ ]:
In [ ]:
assert z == 31.4159
In [ ]:
In [ ]:
assert z_squared == 986.95877281
With that done, all that's left is to submit your code. First, make sure you save your work (go to "File" and choose "Save and Checkpoint".
Go back to the "Assignments" tab. Notice that, in the "Downloaded assignments" tab, there's a little arrow next to "A0". Click it, and a drop-down will appear with a handy "Validate" button on the far right. This button is awesome--it runs all the autograder tests before you even submit! So you automatically know what [autograded] questions work, and which don't. Of course, there can (and will!) still be manually-graded questions, but it should give you a good idea how you're doing.
Go ahead and click validate. Provided you followed the directions, you should see this popup:
All tests passed, well done! All that's left is to send the assignment back to me so I can officially record your grade. Hit the blue "Submit" button on the right. Once it goes through, notice the timestamp that shows up:
This is the server's officially-recorded time of completion for your assignment. You can submit as many times as you want! Only the last submission will ever be graded.
This step is crucial. If you don't submit, I will have no way of knowing that you completed your assignment.