Understanding Notebooks
This is a “You do” part of the first lesson.
You now know what a Jupyter Notebook is, how to work with it in Jupyter Lab (or Google Colab) and how to run Python code in its cells. Let’s now move attention to cells with text.
Master Markdown
The text in Jupyter Notebooks is formatted using Markdown, a straightforward syntax allowing you to format text, embed images or tables, and keep everything as plain text.
For this task, you will focus on getting to know Markdown better. To practise its syntax, try to reproduce the following Wikipedia entry:
https://en.wikipedia.org/wiki/Tobler%27s_first_law_of_geography
Do not overthink it. Focus on correctly formatting the bold, italics, links, headlines, and lists, but don’t worry too much about the overall layout. Bonus if you also manage to insert the image (it does not need to be properly placed as on the original page)!
Play with the math
module to build muscle memory
Play a bit with the math
module you have used in the previous section and focus on learning how to use Jupyter Lab efficiently. Think about Tab completions, contextual help, documentation retrieval, and keyboard shortcuts. You should be able to do it all from inside the Lab without touching the mouse.
- Can you figure out how to round numbers?
- Can you create the natural logarithm of a variable? And can you get the original value back?
- How would you do the base-10 logarithm?
- Can you convert an angle from radians to degrees and back?
- Can you figure out what the
math.nan
constant is for? - Which other constants are available in the
math
module?
Don’t forget to document your code cells with Markdown cells.
You don’t need to answer all of the questions, but try if you have time. If you have limited experience with math
, a good place to start would be documentation of the module but that is up to you.