Note AcademyNote Academy

Computer Science · May / June 2026 · Paper 22 · Question 3

0478

As printed in the paper

Show the answer and mark scheme
  • 3(a)(i)[1]

    Presence (check)

  • 3(a)(ii)[1]

    Check digit

  • 3(b)[3]

    One mark each

    To check that the input matches a specified / required style / pattern / structure
    … by containing set numbers of letters and numbers // … by containing specified groups of digits // … by containing specific characters within the text
    An example of a format e.g. date format dd/mm/yyyy
  • 3(c)[6]

    One mark each

    Appropriate loop to iterate for 15 inputs
    Input of a number
    Test if the input is an integer e.g. use of MOD, DIV or ROUND functions
    Repeated re-input if number not an integer, until it is an integer
    Store integer in the correct array location
    At least two outputs seen, from input prompt / error message / completion message.

    For example:

    FOR Counter ← 1 TO 15

    REPEAT

    OUTPUT "Input a whole number"

    INPUT Value

    IF MOD(Value,1) <> 0

    // IF ROUND(Value,0) <> Value

    // IF DIV(Value,1) <> Value

    THEN

    OUTPUT "Your number was not an integer, please re- input"

    ELSE

    Accepted[Counter] ← Value ENDIF

    UNTIL MOD(Value, 1) = 0

    NEXT Counter

    OUTPUT "The check has been completed"

Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.