IGCSE · Practice questions · Arithmetic, relational and logical operators

Get the order right.

Six original Cambridge-style questions on arithmetic, relational and logical operators, with mark points.

Original questions All questions on this page are original work, written in the Cambridge IGCSE style. They are not from past papers. They test the same concepts and skills the syllabus rewards.
Keep these straight

Brackets first.

01
Recall
[3 marks]

Name the three types of operator used in pseudocode and give one example of each.

  • Arithmetic, e.g. + or * or MOD. ✓
  • Relational, e.g. < or <>. ✓
  • Logical, e.g. AND, OR or NOT. ✓
02
Calculate
[3 marks]

Evaluate: (a) 4 + 6 / 2 (b) (4 + 6) / 2 (c) 3 ^ 2 * 2

  • (a) 6 / 2 = 3, then 4 + 3 = 7 ✓
  • (b) 10 / 2 = 5 ✓
  • (c) 3 ^ 2 = 9, then 9 * 2 = 18 ✓
03
Apply
[3 marks]

X is 7 and Y is 12. State whether each condition is TRUE or FALSE: (a) X > 5 AND Y < 10 (b) X > 5 OR Y < 10 (c) NOT (X = Y)

  • (a) TRUE AND FALSE = FALSE ✓
  • (b) TRUE OR FALSE = TRUE ✓
  • (c) X = Y is FALSE, so NOT gives TRUE ✓
04
Write
[3 marks]

Write pseudocode that inputs an exam mark and outputs "Valid" if it is from 0 to 100 inclusive, or "Invalid" otherwise.

  • INPUT Mark ✓
  • IF Mark >= 0 AND Mark <= 100 ✓
  • THEN OUTPUT "Valid" ELSE OUTPUT "Invalid" with ENDIF ✓
05
Write
[3 marks]

A zoo lets in children under 5 and adults over 80 free. Write an IF statement that outputs "Free" or "Pay" for the variable Age.

  • IF Age < 5 OR Age > 80 ✓
  • THEN OUTPUT "Free" ✓
  • ELSE OUTPUT "Pay" and ENDIF ✓
06
Analysis
[2 marks]

A student writes IF Mark > 40 AND < 60 to test for marks from 41 to 59. Explain the error and correct it.

  • The second part is not a complete comparison: it has no variable to compare with 60. ✓
  • Correct: IF Mark > 40 AND Mark < 60. ✓

Mark this once you have attempted all six and checked your working. It records a Practiced badge on the topic and adds a one-time bonus. Revealing the solutions alone does not count.