Representing algorithms

EasyMediumHard
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
Question 15
Medium

Complete the table below using the algorithm in the pseudocode block below, which calculates the booking cost for a co-working office space based on the number of hours booked and the number of team members attending.

Algorithm

hours ← USERINPUT
members ← USERINPUT
bookingFee ← 45
IF hours > 40 THEN
    baseCost ← hours * 12
ELSE
    IF hours ≥ 20 THEN
        baseCost ← hours * 15
    ELSE
        baseCost ← hours * 20
    ENDIF
ENDIF
totalCost ← baseCost + (members * 15)
IF totalCost < 400 THEN
    totalCost ← totalCost + bookingFee
ENDIF
OUTPUT totalCost

Trace Table

Input value for hoursInput value for membersOutput
4010
128
604
[3]

Representing algorithms Questions

  1. GCSE
  2. /Computer Science
  3. /Representing algorithms