C1 W1 Lab01 Python Jupyter Soln
C1 W1 Lab01 Python Jupyter Soln
Welcome to the first optional lab! Optional labs are available to: - provide information - like
this notebook - reinforce lecture material with hands-on examples - provide working examples of
routines used in the graded labs
1.1 Goals
In this lab, you will: - Get a brief introduction to Jupyter notebooks - Take a tour of Jupyter
notebooks - Learn the difference between markdown cells and code cells - Practice some basic
python
The easiest way to become familiar with Jupyter notebooks is to take the tour available above in
the Help menu:
Jupyter notebooks have two types of cells that are used in this course. Cells such as this which
contain documentation called Markdown Cells. The name is derived from the simple formatting
language used in the cells. You will not be required to produce markdown cells. Its useful to
understand the cell pulldown shown in graphic below. Occasionally, a cell will end up in the
wrong mode and you may need to restore it to the right state:
The other type of cell is the code cell where you will write your code:
[1]: #This is a 'Code' Cell
tomy = 2
print(f"This is code cellos {tomy}")
1.2 Python
You can write your code in the code cells. To run the code, select the cell and either - hold the
shift-key down and hit ‘enter’ or ‘return’ - click the ‘run’ arrow above
1
1.2.1 Print statement
2 Congratulations!
You now know how to find your way around a Jupyter Notebook.