Skip to content
MathsGenie logo
Open app

Course home

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

Develop code

EasyMediumHard
123456789101112131415161718192021222324252627
Question 7

Open the file named Q05b in the code editor.

Write a program to determine a baggage classification based on the weight entered.

The program should:

  • allow the user to input the baggage weight in kg
  • display the correct output message based on the weight entered according to the table below

No validation of input is required.

Save your amended code as Q05bFINISHED with the correct file extension for the programming language.

Baggage weight rules

Baggage weight (kg)Text output message
More than 23Heavy bag fee applies
More than 0Standard baggage
All other inputInvalid weight
[5]

Develop code Questions

  1. IGCSE
  2. /Computer Science
  3. /Develop code