Photo AI

Margaret needs to know when to open the ice cream kiosk - Edexcel - GCSE Computer Science - Question 3 - 2019 - Paper 1

Question icon

Question 3

Margaret-needs-to-know-when-to-open-the-ice-cream-kiosk-Edexcel-GCSE Computer Science-Question 3-2019-Paper 1.png

Margaret needs to know when to open the ice cream kiosk. The pseudocode for an algorithm that determines opening times is shown. The values for month are 1 = Janua... show full transcript

Worked Solution & Example Answer:Margaret needs to know when to open the ice cream kiosk - Edexcel - GCSE Computer Science - Question 3 - 2019 - Paper 1

Step 1

IF (month = 1) THEN

96%

114 rated

Answer

Send 'Do not open' to display.

Step 2

IF (month >= 5) AND (month <= 9) THEN

99%

104 rated

Answer

Check if (day > 1) AND (day < 5):

  • If true, send '12:00 to 18:30' to display.
  • If false, check if (day = 6) OR (day = 7):
    • If true, send '12:00 to 20:00' to display.
    • If false, send 'High season day error' to display.

Step 3

IF (month >= 2) AND (month <= 12) THEN

96%

101 rated

Answer

Check if (day < 1) OR (day > 5):

  • If true, send '13:00 to 18:00' to display.
  • If false, check if (day = 6) OR (day = 7):
    • If true, send '13:00 to 18:00' to display.
    • If false, send 'Low season day error' to display.

Join the GCSE students using SimpleStudy...

97% of Students

Report Improved Results

98% of Students

Recommend to friends

100,000+

Students Supported

1 Million+

Questions answered

;