Question 2 2012 · October-November · Paper 21 · 6 marks
Reveal official mark-scheme answer

Official answer for Question 2
Part (a)
Show text version of question
Question 2
Part (d)
Each subtask is coded as a program module.
Explain how it is possible to use the same variable name for different variables in different modules.
Part (e)
When validating the type of bike (road, hybrid, track) Soni uses
INPUT Bike
IF (Bike = “road”) (Bike = “hybrid”) (Bike = “track”)
THEN
OUTPUT Bike “ is valid”
ELSE
OUTPUT “Invalid”
ENDIF
Insert the correct Boolean operator in each space.
Question 4
Part (f)
All bikes in stock have a bike ID. Each bike ID is six characters long and has the format For
BIKEXX, where X is a digit. Examiner's Use For example, BIKE65 is a valid bike ID.
(i)
In a high-level programming language write code that will validate the format of a
bike ID input into the variable BikeID and output a suitable message. (Add extra line numbers if required.)
Programming language used
Code
Question 1
Question 2
Why this question appears here
82% assigned-topic match · Programming › Programming basics
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9691_w12_qp_21.pdf
