Skip to content
O Level Computer Science 2210 · Topic 8

Programming: past paper questions

236 real questionsasked in 10 of the last 10 exam series2019–2026usually: Write, Identify, Explain, Describe, Give

Real questions on programming

The newest 20 of 236 written questions. Open one to see it on the real paper.

  1. 2210/21 · May/June 2026 · Q1[1]

    Tick (“) one box to identify the type of validation check to test whether a number entered into a computer system is between two set values. A length check B_ presence check C type check Drange check

    See it on the paper →
  2. 2210/21 · May/June 2026 · Q3[3]

    Complete the table by writing the most appropriate data type for each variable described. variable description example data data type Age the age of the student 16 TelephoneNumber | the telephone number of | . 44 7946398573 the student Teenager whether the student is a TRUE teenager or not

    See it on the paper →
  3. 2210/21 · May/June 2026 · Q6[4]

    6 Give programming examples for a count-controlled loop and a post-condition loop. Describe each of the loops. count-controlled loop CxAMPIe .......... COSCTIPTION .......... .......... .......... Post-condition lOOP EXAMPIE .......... description ..........

    See it on the paper →
  4. 2210/21 · May/June 2026 · Q7[4]

    7 An algorithm has been written in pseudocode for a user to repeatedly input positive whole numbers and store them in an array called Values [] until —1 is input or until the array is full. The algorithm outputs the average of the numbers to 2 decimal places. 01 DECLARE Counter : INTEGER 02 DECLARE Total : INTEGER 03 D...

    See it on the paper →
  5. 2210/21 · May/June 2026 · Q11[5]

    The function Power (FirstNumber, SecondNumber) returns the value of FirstNumber raised to the power of SecondNumber. FirstNumber and SecondNumber are integers. Write pseudocode statements to: ¢ define the function * call the function with the variables A and B and store the return value in the variable Value function d...

    See it on the paper →
  6. 2210/21 · May/June 2026 · Q12[15]

    Aweather monitoring station records the number of minutes of sunshine for each day of a month. The one-dimensional (1D) array Sunshine [] is used to store the number of minutes of sunshine for each day. The index of the array represents the day. The one-dimensional (1D) array MonthDays[] contains the number of days in...

    See it on the paper →
  7. 2210/22 · May/June 2026 · Q1[1]

    1 Tick (“) one box to complete the following sentence. Two types of pseudocode statements used for iteration are A CASE and IF .......... NEXT .......... NEXT WHILE .......... .......... ENDWHILE REPEAT .......... UNTIL CASE

    See it on the paper →
  8. 2210/22 · May/June 2026 · Q2[1]

    Tick (W) one box to identify a programming data type used to store a single letter, symbol or number input from the keyboard. A Boolean B_ char C integer Dreal

    See it on the paper →
  9. 2210/22 · May/June 2026 · Q3a(i)[1]

    Acheck to make sure that data has been input and not left blank.

    See it on the paper →
  10. 2210/22 · May/June 2026 · Q3b[3]

    (b) Explain the purpose of a format check and give an example of where it could be used. PUIDOSE ..........

    See it on the paper →
  11. 2210/22 · May/June 2026 · Q3c[6]

    Write the pseudocode for an algorithm to perform a validation check on each number as it is input, using the following criteria: ¢ — Input one number at a time. ° If the number is a whole number, store it in the current element of array Accepted[] ¢ — If the number is not a whole number, ask for it to be input again un...

    See it on the paper →
  12. 2210/22 · May/June 2026 · Q6a[1]

    Complete the trace table for the algorithm, using the input data: post, Y, committee, N, bookkeeper Note: the first character of each word is in position 1. Word WordLength Count NumLetter Choice OUTPUT

    See it on the paper →
  13. 2210/22 · May/June 2026 · Q7b[4]

    Alist of names of the members of a club are stored in a file called Names. txt Write the pseudocode statements to load a line of text from Names. txt and assign the line of text to an appropriately named variable.

    See it on the paper →
  14. 2210/22 · May/June 2026 · Q10[15]

    A program is required to record and analyse the daily rainfall in millimetres for one year. Assume a year has 365 days. The one-dimensional (1D) array Rainfall[] is used to store the daily rainfall measurements. Write a program for the following requirements: ° Initialise the array Rainfall[] to zero. ¢ — Input the rai...

    See it on the paper →
  15. 2210/13 · October/November 2025 · Q6c[2]

    The computer game is programmed using a high-level language. Explain one difference between a high-level language and a low-level language.

    See it on the paper →
  16. 2210/22 · October/November 2025 · Q1[1]

    The result of the arithmetic operation 4 ^ 2 is A 2 B 8 C 16 Tick (✓) one box to complete this sentence.

    See it on the paper →
  17. 2210/22 · October/November 2025 · Q2a[5]

    Identify the line numbers of five errors in the pseudocode and suggest a correction for each error. Error 1 line number Correction Error 2 line number Correction Error 3 line number Correction Error 4 line number Correction Error 5 line number Correction

    See it on the paper →
  18. 2210/22 · October/November 2025 · Q2b(i)[4]

    Complete the pseudocode for PROCEDURE NewData PROCEDURE NewData( ) 1 TO FOR Row FOR Column INPUT 1 TO 4

    See it on the paper →
  19. 2210/22 · October/November 2025 · Q2b(ii)[2]

    Write the pseudocode to input the number of new contacts and to use procedure NewData. A variable declaration is not required.

    See it on the paper →
  20. 2210/22 · October/November 2025 · Q4b[6]

    An email address can be validated by checking that it contains an @ symbol. Write the pseudocode for an algorithm that will allow an email address to be input and check whether or not it contains an @ symbol. Output a suitable message with the result. Use the string function SUBSTRING(EmailAddress, Start, 1) in your so...

    See it on the paper →

What examiners said

Many candidates correctly stated format check, which was the only correct answer for this question. Other incorrect validation checks were seen, including type check and presence check.

— Examiner report, October/November 2023, 2210/22 Q2(a) (Cambridge)

Candidates were required to give an example of normal data and an example of abnormal data that could be used to make sure the check in part (a) is working correctly. In each case, a reason was required. The normal data needed to be any series of digits in the format 99/99/9999 and the abnormal data could be anything that wasn’t a series of digits in the given format, or anything that was an attem...

— Examiner report, October/November 2023, 2210/22 Q2(b) (Cambridge)

Candidates were asked to describe how a length check could be used as a further validation check for a date that had been entered. Many candidates correctly stated that this check would ensure that the date was 10 characters in total (if the slashes are included). Some candidates went on to expand the answer to state that if the answer was not the correct length, it would be rejected, and achieved...

— Examiner report, October/November 2023, 2210/22 Q2(c) (Cambridge)

Past papers, syllabus and examiner reports © UCLES (Cambridge University Press & Assessment). Questions are matched to topics from the official syllabus. AssessPro is independent and not endorsed by Cambridge.