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 = Januar... 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

Open status: Do not open.

Step 2

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

99%

104 rated

Answer

Check day: If day > 1 AND day <= 5, then opening hours: 12:00 to 18:30. If day = 6 OR day = 7, then opening hours: 12:00 to 20:00. Otherwise, display: High season day error.

Step 3

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

96%

101 rated

Answer

Check day: If day >= 1 AND day <= 5, then opening hours: 13:00 to 17:00. If day = 6 OR day = 7, then opening hours: 13:00 to 18:00. Otherwise, display: Low season day error.

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

;