Skip to content

Course home

Develop code

Develop code

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

Develop code Questions

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

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

Question bank