Programming means giving a computer step-by-step instructions. You'll meet two friendly ways in: Scratch, where you drag blocks together, and Python, where you type short, readable code. The best part — you can run real Python right here on the page.
1Scratch — coding with blocks
Scratch is a visual programming language where you build programs by snapping together coloured blocks — no typing of code needed. It's great for learning the ideas of programming.
| Term | Means |
|---|---|
| Sprite | A character/object you control on the stage |
| Script | A stack of blocks that runs in order |
| Blocks | Motion, Looks, Sound, Events, Control, Pen, etc. — each does one thing |
| Stage | The area where your sprites act |
- Scratch is block-based: you snap coloured blocks together instead of typing code.
- A sprite is a character; a script is a stack of blocks that runs in order.
- The Pen blocks make a sprite draw as it moves — good for shapes and patterns.
2Your first Python program
Python is a real, widely-used language with simple, readable syntax. The classic first program prints a message with the print() function:
print("Hello, World!")Whatever you put inside the quotes is shown on screen. Press Run below to execute real Python — then change the message and run it again:
Click Run to execute.
- print("...") displays the text inside the quotes on screen.
- Python is typed code (unlike Scratch's blocks) but is simple and readable.
- Text inside quotes is called a string.
3Data types and arithmetic
Every value in Python has a data type. The three you need now:
| Type | Holds | Example |
|---|---|---|
| int | Whole numbers | 25 |
| float | Decimal numbers | 3.14 |
| string (str) | Text in quotes | "Vidaara" |
You can store values in variables and do arithmetic with + - * / %. Run this and try changing the numbers:
Click Run to execute.
- Data types: int (whole numbers), float (decimals), string (text in quotes).
- A variable stores a value: total = price * qty.
- Arithmetic operators: + - * / and % (remainder).
★ Practical: code a little
Using the Python playgrounds above:
- Print your own name and class on two lines.
- Make two number variables and print their sum and product.
- Store a float (like a price) and a string (like an item) and print them together.
- In Scratch (if available), use Pen + repeat blocks to draw a square.
Ready for the chapter test?
Answer 5 questions. Score 60% or more to mark this chapter complete.
Start the test →💡 Log in to save your progress and earn the certificate.