Skip to content

Course home

Representing algorithms

Representing algorithms

EasyMediumHard
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
Question 27

An algorithm is designed to calculate how many shipping crates are needed to transport a given volume of goods. The pseudocode for this algorithm is shown below:

constant MAX_VOLUME ← 500
constant PACKING_BUFFER ← 25
OUTPUT 'Enter the total volume of goods in litres'
totalVolume ← USERINPUT
effectiveCapacity ← MAX_VOLUME - PACKING_BUFFER
cratesRequired ← 0
REPEAT
    totalVolume ← totalVolume - effectiveCapacity
    cratesRequired ← cratesRequired + 1
UNTIL totalVolume ≤ 0

Select the option that correctly identifies the input variable and the final calculated output variable representing the main result of the algorithm.

A

Input: cratesRequired\text{cratesRequired}cratesRequired, Output: effectiveCapacity\text{effectiveCapacity}effectiveCapacity

B

Input: MAX_VOLUME\text{MAX\_VOLUME}MAX_VOLUME, Output: cratesRequired\text{cratesRequired}cratesRequired

C

Input: totalVolume\text{totalVolume}totalVolume, Output: effectiveCapacity\text{effectiveCapacity}effectiveCapacity

D

Input: totalVolume\text{totalVolume}totalVolume, Output: cratesRequired\text{cratesRequired}cratesRequired

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