Turning pseudocode into Python
Pseudocode steps map to Python lines: <- becomes =, input becomes input(), if becomes if with a colon, for becomes for in range(). END IF becomes un-indenting.
Understanding Turning pseudocode into Python in VCE Software Development U3O1
What it does: IF becomes lowercase if, THEN is replaced by a colon, and the next lines are indented. FOR becomes for ... in range(). The end number in range() is not included, so 1 TO 5 needs range(1, 6). The pseudocode arrow <- becomes a single = in Python. It means 'store this value in the variable'. Python has no THEN. Instead you finish the if line with a colon (:). range() stops BEFORE the end number, so to count 1 to 5 you write range(1, 6). Don't forget the colon. Python has no END IF. The indented lines belong to the if, and the block ends when you go back to the left margin.
Common mistakes: The pseudocode arrow <- becomes = in Python. The line should be name = input('Name: '). Python does not use the pseudocode arrow <-. Assignment uses =, so the line should be score = 0.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 72–96) and word search (Modules 72–113).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
score <- 0 becomes score = 0Fill in the Blanks
Spot the Error
Student with a class code? Join your class →