practice

A new question every time you click.

Original exam-style tasks for IGCSE, O Level, and A Level Computer Science. Pick a topic or let the page choose one, then write the answer in the editor.

All questions

Input and outputCoreIGCSE 0478

Greet the user by name

IGCSE-style INPUT and OUTPUT practice: read a name and print a greeting in Cambridge pseudocode.

Open question
SelectionCoreIGCSE 0478

Pass or fail from a mark

Practice an IF statement in Cambridge IGCSE pseudocode: output Pass or Fail from a single mark.

Open question
SelectionExtendedIGCSE 0478

Letter grade from a mark

Nested IF or CASE practice for IGCSE Computer Science: convert a mark into a letter grade.

Open question
LoopsCoreIGCSE 0478

Validate a menu choice

REPEAT UNTIL practice: keep reading a menu choice until the value is between 1 and 4.

Open question
LoopsCoreO Level 2210

Total five marks

FOR loop practice for IGCSE and O Level: read five marks and output their total.

Open question
LoopsExtendedIGCSE 0478

Count how many students passed

Combine a FOR loop and an IF statement to count how many of ten marks are 50 or more.

Open question
LoopsCoreIGCSE 0478

Find the largest of ten numbers

Running-maximum practice: read ten integers and output the largest value.

Open question
ArraysExtendedAS & A Level 9618

Search an array for a name

Linear search practice with a Boolean flag: find whether a target name exists in an array.

Open question
ArraysCoreIGCSE 0478

Count positive values in an array

Array traversal practice: count how many stored integers are greater than zero.

Open question
StringsCoreIGCSE 0478

Check a password length

LENGTH string routine practice: accept a password only when it has at least 8 characters.

Open question
StringsExtendedIGCSE 0478

Output initials from two names

SUBSTRING practice: read a first name and a last name, then output the two initials.

Open question
ProceduresExtendedAS & A Level 9618

Print a heading with a procedure

PROCEDURE practice for A Level Computer Science: output a line of stars, a title, then another line of stars.

Open question