diff --git a/autograder_gradescope/autograder_gradescope.md b/autograder_gradescope/autograder_gradescope.md index 675c28b..3b75111 100644 --- a/autograder_gradescope/autograder_gradescope.md +++ b/autograder_gradescope/autograder_gradescope.md @@ -45,16 +45,16 @@ The best course of action is to find the test case that failed and use that as a
### Why do I get an error saying "`grader is not defined`"? -If it has been a while since you’ve worked on an assignment, the kernel will shut itself down to preserve memory. When this happens, all of your variables are forgotten, including the grader. That’s OK. The easiest way to fix this is by [restarting your kernel and rerunning all the cells](https://ds100.org/debugging-guide/jupyter_shortcuts/jupyter_shortcuts.html#restarting-kernel). To do this, in the top left menu, click `Kernel` -> `Restart and Run All Cells`. +If it has been a while since you’ve worked on an assignment, the kernel will shut itself down to preserve memory. When this happens, all of your variables are forgotten, including the grader. That’s OK. The easiest way to fix this is by [restarting your kernel and rerunning all the cells](https://ds100.org/debugging-guide/jupyter101/jupyter101.html#restarting-kernel). To do this, in the top left menu, click `Kernel` -> `Restart and Run All Cells`. ### I’m positive I have the right answer, but the test fails. Is there a mistake in the test? -While you might see the correct answer displayed as the result of the cell, chances are your solution isn’t being stored in the answer variable. Make sure you are assigning the result to the answer variable and that there are no typos in the variable name. Finally, [restart your kernel and run all the cells in order](https://ds100.org/debugging-guide/jupyter_shortcuts/jupyter_shortcuts.html#restarting-kernel): `Kernel` -> `Restart and Run All Cells`. +While you might see the correct answer displayed as the result of the cell, chances are your solution isn’t being stored in the answer variable. Make sure you are assigning the result to the answer variable and that there are no typos in the variable name. Finally, [restart your kernel and run all the cells in order](https://ds100.org/debugging-guide/jupyter101/jupyter101.html#restarting-kernel): `Kernel` -> `Restart and Run All Cells`. ### Why does `grader.export(run_tests=True)` fail if all previous tests passed? This can happen if you “overwrite” a variable that is used in a question. For instance, say Question 1 asks you to store your answer in a variable named `stat` and, later on in the notebook, you change the value of `stat`; the test right after Question 1 will pass, but the test at the end of the notebook will fail. It is good programming practice to give your variables informative names and to avoid repeating the same variable name for more than one purpose. ### Why does a notebook test fail now when it passed before, and I didn’t change my code? -You probably ran your notebook out of order. [Re-run all previous cells](https://ds100.org/debugging-guide/jupyter_shortcuts/jupyter_shortcuts.html#running-cells) in order, which is how your code will be graded. +You probably ran your notebook out of order. [Re-run all previous cells](https://ds100.org/debugging-guide/jupyter101/jupyter101.html#running-cells) in order, which is how your code will be graded. ### I accidentally deleted something in a cell that was provided to me – how do I get it back? Suppose you’re working on Lab 5. One solution is to go directly to DataHub and rename your lab05 folder to something else, like lab05-old. Then, click the Lab 5 link on the course website again, and it’ll bring you to a brand-new version of Lab 5. You can then copy your work from your old Lab 5 to this new one, which should have the original version of the assignment. diff --git a/docs/Data-100-Debugging-Guide.pdf b/docs/Data-100-Debugging-Guide.pdf index 43c7172..af2aeec 100644 Binary files a/docs/Data-100-Debugging-Guide.pdf and b/docs/Data-100-Debugging-Guide.pdf differ diff --git a/docs/autograder_gradescope/autograder_gradescope.html b/docs/autograder_gradescope/autograder_gradescope.html index 5db1faf..0b0dc9e 100644 --- a/docs/autograder_gradescope/autograder_gradescope.html +++ b/docs/autograder_gradescope/autograder_gradescope.html @@ -206,11 +206,11 @@

Un

Why do I get an error saying “grader is not defined”?

-

If it has been a while since you’ve worked on an assignment, the kernel will shut itself down to preserve memory. When this happens, all of your variables are forgotten, including the grader. That’s OK. The easiest way to fix this is by restarting your kernel and rerunning all the cells. To do this, in the top left menu, click Kernel -> Restart and Run All Cells.

+

If it has been a while since you’ve worked on an assignment, the kernel will shut itself down to preserve memory. When this happens, all of your variables are forgotten, including the grader. That’s OK. The easiest way to fix this is by restarting your kernel and rerunning all the cells. To do this, in the top left menu, click Kernel -> Restart and Run All Cells.

I’m positive I have the right answer, but the test fails. Is there a mistake in the test?

-

While you might see the correct answer displayed as the result of the cell, chances are your solution isn’t being stored in the answer variable. Make sure you are assigning the result to the answer variable and that there are no typos in the variable name. Finally, restart your kernel and run all the cells in order: Kernel -> Restart and Run All Cells.

+

While you might see the correct answer displayed as the result of the cell, chances are your solution isn’t being stored in the answer variable. Make sure you are assigning the result to the answer variable and that there are no typos in the variable name. Finally, restart your kernel and run all the cells in order: Kernel -> Restart and Run All Cells.

Why does grader.export(run_tests=True) fail if all previous tests passed?

@@ -218,7 +218,7 @@

Why does a notebook test fail now when it passed before, and I didn’t change my code?

-

You probably ran your notebook out of order. Re-run all previous cells in order, which is how your code will be graded.

+

You probably ran your notebook out of order. Re-run all previous cells in order, which is how your code will be graded.

I accidentally deleted something in a cell that was provided to me – how do I get it back?

diff --git a/docs/jupyter_datahub/jupyter_datahub.html b/docs/jupyter_datahub/jupyter_datahub.html index 435980f..7aa05aa 100644 --- a/docs/jupyter_datahub/jupyter_datahub.html +++ b/docs/jupyter_datahub/jupyter_datahub.html @@ -189,7 +189,7 @@

M
  • Restart your kernel
  • Rerun your cells
  • -

    Note that you may loose some recent work if your kernel restarted when you were in the middle of editing a cell. As such, we recommend saving your work as often as possible.

    +

    Note that you may loose some recent work if your kernel restarted when you were in the middle of editing a cell. As such, we recommend saving your work as often as possible.

    If this does not fix the issue, it could be a problem with your code, usually the last cell that executed before your kernel crashed. Double check your logic, and feel free to make a private post on Ed if you’re stuck!

    diff --git a/docs/pandas/pandas.html b/docs/pandas/pandas.html index bb4a30d..505a661 100644 --- a/docs/pandas/pandas.html +++ b/docs/pandas/pandas.html @@ -203,7 +203,7 @@

    Understanding

    My code is taking a really long time to run

    It is normal for a cell to take a few seconds – sometimes a few minutes – to run. If it’s is taking too long, however, you have several options:

      -
    1. Try restarting the kernel. Sometimes, Datahub glitches or lags, causing the code to run slower than expected. Restarting the kernel should fix this problem, but if the cell is still taking a while to run, it is likely a problem with your code.
    2. +
    3. Try restarting the kernel. Sometimes, Datahub glitches or lags, causing the code to run slower than expected. Restarting the kernel should fix this problem, but if the cell is still taking a while to run, it is likely a problem with your code.
    4. Scrutinize your code. Am I using too many for loops? Is there a repeated operation that I can substitute with a pandas function?
    @@ -225,7 +225,7 @@

    This often happens when you use a default keyword (like str, list, range, sum, or max) as a variable name, for instance:

    sum = 1 + 2 + 3

    These errors can be tricky because they don’t error on their own but cause problems when we try to use the name sum (for example) later on in the notebook.

    -

    To fix the issue, identify any such lines of code, change your variable names to be something more informative, and restart your notebook.

    +

    To fix the issue, identify any such lines of code, change your variable names to be something more informative, and restart your notebook.

    Python keywords like str and list appear in green text, so be on the lookout if any of your variable names appear in green!

    diff --git a/jupyter_datahub/jupyter_datahub.md b/jupyter_datahub/jupyter_datahub.md index 75a8098..d0bc8e4 100644 --- a/jupyter_datahub/jupyter_datahub.md +++ b/jupyter_datahub/jupyter_datahub.md @@ -38,7 +38,7 @@ When you see a message like this: 2. [Restart your kernel](https://ds100.org/debugging-guide/jupyter101/jupyter101.html#restarting-kernel) 3. [Rerun your cells](https://ds100.org/debugging-guide/jupyter101/jupyter101.html#running-cells) -Note that you may loose some recent work if your kernel restarted when you were in the middle of editing a cell. As such, we recommend [saving your work](https://ds100.org/debugging-guide/jupyter101/jupyter101.html/saving-your-notebook) as often as possible. +Note that you may loose some recent work if your kernel restarted when you were in the middle of editing a cell. As such, we recommend [saving your work](https://ds100.org/debugging-guide/jupyter101/jupyter101.html#saving-your-notebook) as often as possible. If this does not fix the issue, it could be a problem with your code, usually the last cell that executed before your kernel crashed. Double check your logic, and feel free to make a private post on Ed if you're stuck! diff --git a/pandas/pandas.md b/pandas/pandas.md index 2652c6b..c00ed7c 100644 --- a/pandas/pandas.md +++ b/pandas/pandas.md @@ -24,7 +24,7 @@ This note is (mostly) structured around the error messages that show up at the b ## My code is taking a really long time to run It is normal for a cell to take a few seconds -- sometimes a few minutes -- to run. If it's is taking too long, however, you have several options: -1. Try restarting the kernel. Sometimes, Datahub glitches or lags, causing the code to run slower than expected. [Restarting the kernel](https://ds100.org/debugging-guide/jupyter_shortcuts/jupyter_shortcuts.html#restarting-kernel) should fix this problem, but if the cell is still taking a while to run, it is likely a problem with your code. +1. Try restarting the kernel. Sometimes, Datahub glitches or lags, causing the code to run slower than expected. [Restarting the kernel](https://ds100.org/debugging-guide/jupyter101/jupyter101.html#restarting-kernel) should fix this problem, but if the cell is still taking a while to run, it is likely a problem with your code. 2. Scrutinize your code. Am I using too many for loops? Is there a repeated operation that I can substitute with a `pandas` function? ## Why is it generally better avoid using loops or list comprehensions when possible? @@ -44,7 +44,7 @@ This often happens when you use a default keyword (like `str`, `list`, `range`, These errors can be tricky because they don’t error on their own but cause problems when we try to use the name `sum` (for example) later on in the notebook. -To fix the issue, identify any such lines of code, change your variable names to be something more informative, and [restart your notebook](https://ds100.org/debugging-guide/jupyter_shortcuts/jupyter_shortcuts.html#restarting-kernel). +To fix the issue, identify any such lines of code, change your variable names to be something more informative, and [restart your notebook](https://ds100.org/debugging-guide/jupyter101/jupyter101.html#restarting-kernel). Python keywords like `str` and `list` appear in green text, so be on the lookout if any of your variable names appear in green!