Margaret needs to know when to open the ice cream kiosk - Edexcel - GCSE Computer Science - Question 3 - 2019 - Paper 1
Question 3
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
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Open status: Do not open.
Step 2
ELSE IF (month >= 5) AND (month <= 9) THEN
99%
104 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
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
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
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.