MAKE A COPY OF THIS FILE
In this first assignment, you'll become familiar with the Colab Notebook.
This is a Colab Notebook.
Under the hood, "Colab Notebooks" are a special Google-hosted version of what we call "Jupyter Notebooks." These notebooks mix text, code, and data visualization in one document.
.ipynb
Shift+Enter
or by clicking the ▶️ buttonprint(...)
, the output appears below the cellThis might seem like a lot, but you'll be spending lots of time here over the next three weeks, so get comfortable!
Practice using variables to store and manipulate data.
my_name = "Mr. P"
print(my_name)
my_cats_age = 11
in_human_years = my_cats_age * 7
print(f"In human years, my cat is {in_human_years}")
Not how I formatted the in_human_years
variable into the print string using the special f"..."
string (which we call an f-string
).
print()
and f-strings to display:Try it in the code cell below!
message = "Hello world"
print(message)