301.1 Output and Sequence
Practise exam questionsOutput and Sequence — Note 3 of 3
Predict order that statements run.
Python executes statements from top to bottom, one at a time. The order matters — using a variable before it is assigned causes an error.
x = 5
x = x + 1
print(x) # 6, not 5
# Swapping order would give a different resultSpecification notes for programming are in Paper 2.