Skip to content

Course home

Representing algorithms

Representing algorithms

EasyMediumHard
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
Question 7

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]
Markscheme

Representing algorithms Questions

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

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.

Question bank