A sports physiotherapy clinic uses a program to make file names for exercise videos. A therapist enters a patient reference and an exercise title. Spaces in...

Assessment: Computer Science 9210 | Paper 1 Mock 01 | Programming (on-screen) Subject: Computer Science - 9210

Question 1 Report

A sports physiotherapy clinic uses a program to make file names for exercise videos. A therapist enters a patient reference and an exercise title. Spaces in the title must be replaced with underscore characters so that the file can be uploaded to the clinic server. The original title is still displayed to patients in a friendly form.

(a) Explain why the program should keep a separate original title for the patient display. [1]
(b) When the title is ankle balance, state the server-safe title after spaces are replaced. [1]
(c) Explain how a replace operation is preferable to manually selecting every space when titles have different lengths. [1]



For each volunteer on a river-cleanup day, the registration program creates a badge message from a first name and a team colour. The organiser wants the message displayed as WELCOME, NAME - TEAM TEAM. Names are entered with normal capitalisation, while team colours are stored in lower case. The program should not alter the volunteer's original name because it is also printed on a certificate.

(a) Explain why the team colour can be converted to upper case without changing the stored name. [1]
(b) When the name is Asha and the colour is green, state the complete badge message. [1]
(c) Explain how concatenation includes punctuation and spaces in the final string. [1]

Answer Details

Exercise-video titles

  1. The original title should be kept because it contains spaces and is easier for patients to read. The underscore version is only needed for the server-safe file name. [1]
  2. Replacing the space in ankle balance gives ankle_balance. [1]
  3. A replace operation finds and changes every occurrence of a space automatically. It therefore works for titles of any length without manually locating each space. [1]

Volunteer badge messages

  1. The team colour can be converted to upper case in a copy or value used for the message; this does not modify the separately stored volunteer name. [1]
  2. Combining the literal text, name and upper-case colour gives WELCOME, Asha - GREEN TEAM. [1]
  3. Concatenation joins string values. The literal strings include the comma, hyphen and required spaces, while the variables supply the name and team colour. [1]

Download The App On Google Playstore

Everything you need to excel in your exams

Green Bridge CBT Mobile App
Personalized AI Learning Chat Assistant
200,000+ Exam Questions Across IGCSE, JAMB, WAEC & NECO
Over 3,900 Lesson Notes
Offline Support - Learn Anytime, Anywhere
Green Bridge Timetable
Literature Summaries & Potential Questions
Track Your Performance & Progress
In-depth Explanations for Comprehensive Learning