Using Jupyter (Good), Exercises

Exercise 1 (Learning to interrupt)  

Copy and paste the following simple, innocent code and run it.

while True:
    print('*', end='')

Your Jupyter Notebook should be printing like crazy right now.

Figure out how to interrupt the proceedings (Kernal).

Exercise 2 (Resetting & Restarting the Kernal)  

Run the following:

print = 'PRINT'

Now try:

print('Hello World')

Yes, you have messed up your print() function1.

Fix this by Restarting the Kernal. This will also restart the Python interpreter.

Back to top

Footnotes

  1. Okay, okay it was me, but you pressed the button.↩︎