A ticket machine asks for your age, picks a price and adds up the bill.
3 lessons, about 1 h 25 min3 simulations10 problems3 practice questionsPython in every lesson
In the written exam a program is answered in pseudocode, not in a real language. This lesson shows the Cambridge way of writing variables, constants, the five data types, the operators, input and output, beside the Python you may know already.
A program chooses what to do next by testing a condition. This lesson writes that choice in Cambridge pseudocode with IF statements, nested IF statements and CASE statements, and shows the same choice in Python.
A program repeats steps with a loop. This lesson writes the three loops of the syllabus in Cambridge pseudocode: the count-controlled FOR loop, the pre-condition WHILE loop and the post-condition REPEAT loop. It then uses them for totals, counts and nested statements, with a trace table.
Log in to join the discussion.
Loading…