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 = 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
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Send 'Do not open' to display.
Step 2
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 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
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!