0% found this document useful (0 votes)
15 views

C1 W1 Lab01 Python Jupyter Soln

Uploaded by

dasslopez80
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

C1 W1 Lab01 Python Jupyter Soln

Uploaded by

dasslopez80
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

C1_W1_Lab01_Python_Jupyter_Soln

March 13, 2024

1 Optional Lab: Brief Introduction to Python and Jupyter Note-


books

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}")

This is code cellos 2

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

Print statements will generally use the python f-string style.


Try creating your own print in the following cell.
Try both methods of running the cell.
[2]: # print statements
variable_t = "right in the strings!"
print(f"f strings allow you to embed variables {variable_t}")

f strings allow you to embed variables right in the strings!

2 Congratulations!

You now know how to find your way around a Jupyter Notebook.

You might also like