Session 1 — Speak Python
Duration: 75 min · Format: live online · Ages: 12–15
Session goal: by the end, students can open Google Colab, write and run Python, store values in variables, and use
print(), math, and the three basic data types.
Before class — prep (5 min)
- Open Google Colab → New notebook (signed in with a Google account), ready to screen-share. You'll type live in a cell.
- Have the two diagrams below ready to share on screen (code and its output and variables as labelled boxes).
- Make sure students each have (or can sign into) a Google account so they can open their own Colab notebook.
Agenda
| Time | Segment |
|---|---|
| 0:00 | Hook — computers do exactly what you say (5 min) |
| 0:05 | Teach — code is instructions the computer runs (13 min) |
| 0:18 | Teach — variables store information (15 min) |
| 0:33 | Activity — your first real code in Colab (25 min) |
| 0:58 | Check for understanding (10 min) |
| 1:08 | Wrap-up + homework (7 min) |
0:00 · Hook (5 min)
Ask the class and take a few answers (chat or unmute):
- "If a computer is so powerful, why can't it just figure out what you want?"
- "What happens if you skip a step in a recipe — does the cook improvise, or fail?"
Land the idea: computers are powerful but not clever — they do exactly what you tell them, in order, step by step. Writing those steps in a language the computer understands is called coding. Tell them that today, that language is Python — the same language that powers apps, AI, and even space missions.
0:05 · Teach — Code is instructions the computer runs (13 min)
Explain: you write instructions, the computer runs them and shows the output. Nothing more magical than that.
Share this diagram and point out the three parts — the code you write, the Run button, and the output that appears:
Type/run this together in Colab:
name = "Sara"
print("Hi,", name)
Run it live so they see the output appear: Hi, Sara.
Ask: "The computer just obeyed an instruction — what exactly did we tell it to do?" (Answer: store the text Sara in name, then print Hi, followed by whatever is in name.)
⚠ Watch for the #1 confusion: students expect the computer to "understand" the sentence. It doesn't — it only runs each line in order. If a line is wrong, it won't guess what you meant; it will error out.
0:18 · Teach — Variables store information (15 min)
Explain: a variable is a labelled box that holds a value so you can use it again later.
Share this diagram and walk through each box — the label on the outside, the value inside:
Type/run this together in Colab:
name = "Sara" # text (a string)
age = 13 # whole number (an integer)
is_student = True # yes/no (a boolean)
print(name, "is", age, "years old.")
print("Next year:", age + 1)
Point out the three data types as you go — text (a string), numbers (an integer), and True/False (a boolean). These are the building blocks of every program.
Ask: "Why does age + 1 give 14, but if age were text it would break?" (Answer: you can do math on numbers, not on quoted text.)
⚠ Watch for: text needs quotes (
"Sara"), numbers don't (13). And=means "store this value", not "is equal to".
0:33 · Activity — Your first real code (25 min)
Have students open their own Google Colab → New notebook, then work through these steps. Screen-share your own notebook as a model.
Type/run this together in Colab:
my_name = "type your name here"
my_age = 12
print("Hello, my name is", my_name)
print("In 5 years I will be", my_age + 5)
Then have them change the values and run again, and try the math operators: * (times), / (divide), - (minus).
Circulate for (or watch the chat for) the two errors nearly everyone hits — forgetting the quotes around text, and gluing text together with a space instead of a comma.
Demo the Debug Game. Share this broken code and ask students to spot two mistakes before you fix it:
city = Cairo
print("I live in " city)
Ask: "What are the two problems?" Then fix it live:
1. Text needs quotes: city = "Cairo".
2. You can't glue text together with a space — use a comma: print("I live in", city).
0:58 · Check for understanding (10 min)
Ask these aloud or drop them in the chat. Answer key (for you):
- What does
print(3 + 4)print? →7— no quotes, so Python does the math. (With quotes,print("3 + 4")would print3 + 4.) - Which data type is
True? → A boolean — it can only beTrueorFalse. - Why does
name = "Sara"use quotes butage = 13doesn't? →"Sara"is text (a string) and text needs quotes;13is a number and numbers don't.
1:08 · Wrap-up + homework (7 min)
- Ask one student to finish the sentence: "A variable is…"
- Homework — About Me program: write a tiny "About Me" program in Colab that stores your
name,age, andfavourite_subjectin variables, then prints a friendly sentence using all three. Screenshot it — it's the first snippet in your portfolio. Bring it to Session 2.
Teaching notes
- Correct this misconception: "the computer understands what I mean." It doesn't — it runs each line literally. Reframe coding as writing exact, ordered instructions.
- Common coding errors students hit: missing quotes around text (
city = Cairo); using a space instead of a comma insideprint(); typing a capitalPrint; using=when they mean to compare. Show that Python's error message points to the line that broke. - Fast finishers (extension): they're heading into data science, so introduce its main tool — Pandas. Have them run this in a new cell:
```python import pandas as pd
data = {"name": ["Sara", "Omar", "Lina"], "score": [95, 88, 73]} df = pd.DataFrame(data)
print(df) # the whole table print(df.shape) # (rows, columns) print(df["score"].mean()) # average score ```
Explain that df is a DataFrame — a table of data, like a smart spreadsheet. Challenge them to add a 4th person, then print the highest score with df["score"].max(). Next session they load a real dataset into one of these.
- Also for fast finishers: make Python print a name 10 times in one line with print("Sara\n" * 10) — ask what \n does (a new line).
- Low-tech fallback: if student devices can't run Colab, type everything on your shared screen and have students predict each output before you press Run, then write their "About Me" program on paper to type up later.
Vocabulary
| Term | Meaning |
|---|---|
| Code | Instructions written for a computer |
| Variable | A labelled box that stores a value |
| String | Text, always inside quotes |
| Integer | A whole number |
| Boolean | True or False |
Resources
- Google Colab — write and run Python in your browser (free).
- freeCodeCamp — Python — free, hands-on lessons.
- W3Schools Python — quick, clear reference with "Try it" buttons.
- Kaggle — Python (free course) — great next step for fast finishers.
Next session
Session 2 — Playing with Data: students use lists and loops (and Pandas, for fast finishers) to store and explore many values at once.