0984

Programming Concepts

Programming · 4 question types

Exam Frequency Analysis

Past paper frequency (2018 to 2024)

This topic accounts for approximately 13% of your exam marks.

stable
High
Stable13%

Paper 2 is almost entirely programming. Variable types, assignments, loops and conditionals are tested every session.

Comparison operators compare two values and return a (TRUE or FALSE). They are the building blocks of IF statements and loop conditions.

OperatorMeaningExampleResult
=Equal toAge = 18TRUE if age is 18
<>Not equal toScore <> 0TRUE if score is not zero
<Less thanSpeed < 30TRUE if speed under 30
>Greater thanTemperature > 25TRUE if temperature over 25
<=Less than or equal toMark <= 40TRUE if mark is 40 or below
>=Greater than or equal toAge >= 18TRUE if age is at least 18

Common slip: in some real programming languages (Python, Java), the test for equality is ==, not =. In CIE pseudocode the single = is correct. Using == in a pseudocode answer often costs marks.