Programming Fundamentals resources
Computer Science, grade 9. Notes, worksheets, videos, interactive tools and revision materials for this chapter.
Notes
Study notes
The chapter's lessons are the notes — read them in order, then use the resources below.
01VariablesA named box that stores a value — in real, runnable Python.Read lesson →02Output and InputMake programs talk to the user with print and input.Read lesson →03Making DecisionsBranch your program's behaviour with if, elif and else.Read lesson →04Repeating with LoopsRepeat actions efficiently with for and while loops.Read lesson →
Worksheets
Practice worksheet
Attempt every question before revealing the answer — that struggle is where learning happens.
1. Write a program that stores your favourite food in a variable and prints 'I love …'.
Create the variable first, then print it inside a longer string.
food = "pizza" print("I love " + food)
2. What is wrong with this code? `price = "9.99"` then `print(price + 1)`.
Check the type of price.
price is a string ("9.99"), so price + 1 tries to add a number to text — a TypeError. Fix: price = 9.99 or float(price) + 1.
3. Swap the values of a and b using a third variable temp.
Store one value safely before overwriting it.
temp = a a = b b = temp
Videos
Watch and learn
Hand-picked searches to find a clear video explanation of each lesson.
Revision
Revision checklist
Can you explain each of these out loud, without looking? If not, re-read that lesson.
- A variable is a named box storing one value at a time; = assigns, it doesn't mean 'equals'.
- Core types: str (text), int (whole numbers), float (decimals), bool (True/False).
- Names must start with a letter or underscore, and should be meaningful.
- type() reveals a value's type; int(), float(), str() convert between types.
- "17" (text) and 17 (number) behave differently — the type decides what operations do.