Free November promotion: everything is free until 30 November 2026 — every subject, unlimited practice.
Subjects / LC Computer Science / Strand 2: Core concepts

Programming in Python

Variables, data types, operators, selection, iteration and reading code to predict its output.

In review 5th Year6th Year HigherOrdinary
15practice questions

Fill the gaps: 1 · Match the pairs: 1 · Multiple choice: 10 · Numeric answer: 1 · Short answer: 2

Each question has up to three hints, a worked explanation, and is tracked in your progress and review plan.

Practise this topic

Try a question

Multiple choiceWritten exam – code reading
What is printed by this Python code? x = 5 y = 3 x = x + y y = x - y print(x, y)
Choose one answer
Hint 1

Trace one line at a time and write down the value of each variable after every line.

Create a free account to save your progress.