🧩Statement
One whole step in a program. Each is like a line on a to-do list.
Think of it like
Think of it like one line in a to-do list. Each line is one thing to do.
Example
Jack's program has three statements. The first keeps a number, the second adds one, the third prints the result.
Why it matters
Reading code means reading statements in order. Once you see each one as one step, any program gets easier.
Definition
Example code
python
age = 12 # statement 1
age = age + 1 # statement 2
print(age) # statement 3, prints 13Common mistake
Key takeaways
- 1One step. Each statement is one thing for the computer to do.
- 2Top to bottom. Statements run in the order they are written.
- 3Can hold others. An if or a loop wraps more statements.