The long-stay parking at the airport uses a variable rate charging system - Edexcel - GCSE Computer Science - Question 2 - 2020 - Paper 1
Question 2
The long-stay parking at the airport uses a variable rate charging system.
Here is the pseudocode for this algorithm.
SEND "Welcome to airport parking" TO DISPLAY... show full transcript
Worked Solution & Example Answer:The long-stay parking at the airport uses a variable rate charging system - Edexcel - GCSE Computer Science - Question 2 - 2020 - Paper 1
Step 1
IF (days > 8) 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
If the number of days exceeds 8, the cost is given by the formula:
extcost=55+10imes(extdays−8)
Step 2
ELSE IF (days >= 6) 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
For 6 to 8 days, the cost is a flat fee of $55.
Step 3
ELSE IF (days >= 3) 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
For 3 to 5 days, set the cost to $45.
Step 4
ELSE
98%
120 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!