Note AcademyNote Academy

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

0478

As printed in the paper

The question as text

This flowchart inputs the points won and the points lost when playing a game. The difference between the points won and lost is calculated and depending on the result the player can: move up to the next level, stay at the same level, or move down to the previous level. The flowchart finishes when the input for points won is –1. START INPUT PointsWon, PointsLost END Yes Yes Yes No No No OUTPUT "Keep on trying" OUTPUT "Sorry move down" Difference PointsWon - PointsLost IS PointsWon = –1 ? IS Difference > = 1000 ? IS Difference < 0 ? OUTPUT "Well done move up"

Read automatically from the paper; the printed page above is exact.

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

    One mark for correct input (PointsWon and PointsLost)

    One mark for correct calculations (Difference)

    One mark for correct output

    PointsWon

    PointsLost

    Difference

    OUTPUT

    5000

    4474

    526

    Keep on trying

    6055

    2000

    4055

    Well done move up

    7900

    9800

    -1900

    Sorry move down

    3000

    2150

    850

    Keep on trying

    -1

    6700

  • 4(b)[3]

    Any three from:

    Add extra decision box …
    … before checking for difference greater than or equal to 1000

    // change Is difference >= 1000 to >= 1000 and <= 5000

    Check for difference greater than 5000
    Add extra Output ‘Fantastic leap up two levels’…
    … before flowline returns to input

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