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
Greet the user by name
IGCSE-style INPUT and OUTPUT practice: read a name and print a greeting in Cambridge pseudocode.
Open questionPass or fail from a mark
Practice an IF statement in Cambridge IGCSE pseudocode: output Pass or Fail from a single mark.
Open questionLetter grade from a mark
Nested IF or CASE practice for IGCSE Computer Science: convert a mark into a letter grade.
Open questionValidate a menu choice
REPEAT UNTIL practice: keep reading a menu choice until the value is between 1 and 4.
Open questionTotal five marks
FOR loop practice for IGCSE and O Level: read five marks and output their total.
Open questionCount how many students passed
Combine a FOR loop and an IF statement to count how many of ten marks are 50 or more.
Open questionFind the largest of ten numbers
Running-maximum practice: read ten integers and output the largest value.
Open questionSearch an array for a name
Linear search practice with a Boolean flag: find whether a target name exists in an array.
Open questionCount positive values in an array
Array traversal practice: count how many stored integers are greater than zero.
Open questionCheck a password length
LENGTH string routine practice: accept a password only when it has at least 8 characters.
Open questionOutput initials from two names
SUBSTRING practice: read a first name and a last name, then output the two initials.
Open questionPrint 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