Skip to content

Course home

Constructs

Constructs

EasyMedium
1234567891011121314
Question 1

A programmer is writing an algorithm to calculate parcel delivery costs.

constant MAX_WEIGHT = 20
constant OVER_LIMIT_CHARGE = 15.50
variable packageWeight = real(input("Enter weight: "))
variable basePrice = 5.00

if packageWeight > MAX_WEIGHT then
    totalPrice = basePrice + OVER_LIMIT_CHARGE
else
    totalPrice = basePrice
endif

Give the name of one constant used in this algorithm.

[1]
Markscheme

Constructs Questions

  1. IGCSE
  2. /Computer Science
  3. /Constructs

18 exam-style questions on Edexcel IGCSE Computer Science Constructs. Each one has a worked solution and a mark scheme showing where the marks go.

Question bank