Photo AI

The long-stay parking at the airport uses a variable rate charging system - Edexcel - GCSE Computer Science - Question 2 - 2020 - Paper 1

Question icon

Question 2

The-long-stay-parking-at-the-airport-uses-a-variable-rate-charging-system-Edexcel-GCSE Computer Science-Question 2-2020-Paper 1.png

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

Answer

If the number of days exceeds 8, the cost is given by the formula:

extcost=55+10imes(extdays8) ext{cost} = 55 + 10 imes ( ext{days} - 8)

Step 2

ELSE IF (days >= 6) THEN

99%

104 rated

Answer

For 6 to 8 days, the cost is a flat fee of $55.

Step 3

ELSE IF (days >= 3) THEN

96%

101 rated

Answer

For 3 to 5 days, set the cost to $45.

Step 4

ELSE

98%

120 rated

Answer

For 1 or 2 days, set the cost to $25.

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

;