Note AcademyNote Academy

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

0478

As printed in the paper

The question as text

This algorithm checks the temperature of hot food being served to customers. START Counter 0 ounter Counter + 1 Error ((Hot + Cold) / Counter) * 100 Hot 0 Cold 0 Serve 0 Serve Serve + 1 INPUT Temp OUTPUT Error OUTPUT "Too Cold" OUTPUT "Too Hot" Is Temp = –1? Is Temp > 86? Is Temp < 63? END Hot Hot + 1 Cold Cold + 1 Yes No No No Yes Yes

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

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

    One mark for each correct column

    Counter

    Hot

    Cold

    Serve

    Temp

    Error

    OUTPUT

    0

    0

    0

    0

    1

    1

    75

    2

    2

    78

    3

    3

    84

    4

    1

    87

    Too Hot

    5

    2

    91

    Too Hot

    6

    4

    80

    7

    5

    75

    8

    6

    70

    9

    7

    65

    10

    1

    62

    Too Cold

    -1

    30

    30

  • 4(b)[1]

    include a message to explain the value output / e. g. “The percentage of meals not served” //

    outputting Hot, Cold and Serve

  • 4(c)[1]

    updating the Serve variable // Serve ← Serve + 1

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