Complete the table below using the algorithm in the pseudocode package below.
weight ← USERINPUT
distance ← USERINPUT
adminFee ← 35
IF weight > 100 THEN
baseCost ← weight * 3
ELSE
IF weight ≥ 50 THEN
baseCost ← weight * 5
ELSE
baseCost ← weight * 8
ENDIF
ENDIF
totalCost ← baseCost + (distance * 10)
IF totalCost < 600 THEN
totalCost ← totalCost + adminFee
ENDIF
OUTPUT totalCost
Input value for weight | Input value for distance | Output |
|---|---|---|
| 100 | 40 | |
| 30 | 15 | |
| 200 | 5 |
208 exam-style questions on AQA GCSE Computer Science Representing algorithms. Each one has a worked solution and a mark scheme showing where the marks go.