Note AcademyNote Academy

Computer Science · May / June 2025 · Paper 22 · Question 4

0478

As printed in the paper

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

    To check that the value entered has not changed on input.

  • 4(b)[6]

    One mark per mark point, max six

    MP1 At least one appropriate working loop

    MP2 First inputs of numbers all stored in array Numbers

    MP3 Correct second input made for each number

    MP4 Working selection statement to compare first and second inputs one at a time

    MP5 If numbers don’t match, appropriate output, including both values input and a message requiring re-input

    MP6 New input stored in current array location (replacing original input) MP7 Final output confirming completion, outside loop.

    For example,

    // variable and array declarations or initialisations // are not required for this question

    FOR Index ← 1 TO 10

    INPUT Numbers[Index]

    NEXT Index

    FOR Index ← 1 TO 10

    INPUT CheckNumber

    IF CheckNumber <> Numbers[Index]

    THEN

    OUTPUT CheckNumber, " and ", Numbers[Index], " do not match. Please re-enter the number. " INPUT Numbers[Index]

    ENDIF

    NEXT Index

    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.