Skip to content
MathsGenie logo
Open app

Course home

  1. IGCSE
  2. Computer Science Edexcel
  3. Question bank

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]

Constructs Questions

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