If you've never used Google Colab — or never used any kind of notebook — this is for you.
What you'll do
By the end of this post you will:
- Have opened a Colab notebook.
- Have run a Python cell that prints something.
- Have saved the notebook in your Google Drive.
- Have a public link you can share with us.
It takes about ten minutes.
Step 1 — Sign in
Visit colab.research.google.com. If you're signed into a Google account in your browser, you're already in. If not, sign in with the account you want to use for the course.
Step 2 — New notebook
Click File → New notebook. You'll see a single empty cell. The icon at the top right says "Connect." Wait a few seconds — Colab is allocating a small computer for you. The label will change to a green checkmark with a memory/disk gauge.
Step 3 — Your first line of code
Click inside the cell. Type:
print("Hello, future scholar.")Press Shift + Enter to run the cell. The output appears below it.
Take a moment to notice what happened: you pressed two keys, and a computer somewhere ran code on your behalf. That's the whole shape of programming.
Step 4 — Add another cell
Click the + Code button (top left, just below the toolbar). A new cell appears. Type:
2 + 2Run it. The output is 4 — no print needed in a notebook, because the last expression's value is shown automatically.
Step 5 — Save and rename
Click the filename at the top (Untitled0.ipynb) and rename it wk00-first-notebook.ipynb. Colab auto-saves to your Drive.
Step 6 — Share
Click Share in the top right. In the dialog, change General access from "Restricted" to "Anyone with the link", with view access. Click Copy link.
Paste that link into the submit form. Pick Week 0 — First notebook screenshot as the assignment.
Done. Welcome to the course.