CAMBRIDGE ASSESSMENT INTERNATIONAL EDUCATION
Cambridge ICT Starters
ON TRACK 4293/A
Stage 2: Programming for a Purpose For moderation from 2019
Maximum time allowed: 1 hour 30 minutes
Additional Materials: MyPrograms_4393A.doc
Flowcharting software (optional)
READ THESE INSTRUCTIONS FIRST
Write your Centre number, candidate number and name on all the work you hand in.
For Tutor Use
Programming for a Purpose
Pass/ Please
Candidate was able to:
Merit tick
Plan an interactive program using
P
abstraction.
Create and test an interactive program
P
using selection, input and output.
Predict the output of an interactive
P
program that uses input and selection.
Create and formally test an interactive
M
program using selection, input and output.
Correct (debug) a short interactive
M
program containing more than one error.
Tutors also need to complete and sign the
Learning Objectives Record Sheet for each Candidate.
This document consists of 10 pages. Blank pages are indicated.
© UCLES 2019 [Turn over
2
On Track – Stage 2 – Programming for a Purpose
Flowchart symbol key:
Symbol Name Description
Terminator Shows the start and end of a process
Data Shows inputs and outputs
Decision Shows a decision that branches a process
Connector Connects up the process
Process Shows a step in the process
Shows a named set of instructions which
Procedure
perform a specific process
© UCLES 2019 4293/01A/J/19
3
Centre Number Candidate Number Name
On Track – Stage 2 – Programming for a Purpose
Section A
1 The flowchart below shows a program which uses selection, input and output.
The program is run four times and new inputs are added each time.
Complete the table to predict what the output would be from this program if the
following values were input.
Input A Input B Output
3 –5
4 6
7 2
–8 1
(LO3)
© UCLES 2019 4293/01A/J/19 [Turn over
4
Centre Number Candidate Number Name
On Track – Stage 2 – Programming for a Purpose
2 A theatre sells four different types of ticket. The table below shows the price and
age range for each ticket type.
Ticket type Age (years) Price ($)
Child 12 and under FREE
Junior 12 – 17 $10
Adult 18+ $20
Senior 65+ $15
Some adult customers have a theatre membership card. The membership card
reduces the price of an adult ticket to $18. This discount applies to adult tickets
only.
The theatre uses an interactive program at the box office. The program asks the
customer questions to decide which ticket they require, then displays the price to
the customer. After the price is displayed, the system repeats to allow the next
customer to use the program.
You are going to plan the theatre’s interactive program.
(a) What input(s) will be needed?
(b) What output(s) will be needed?
© UCLES 2019 4293/01A/J/19
5
Centre Number Candidate Number Name
On Track – Stage 2 – Programming for a Purpose
(c) Create a flowchart to show how the program would function. You may draw
your flowchart by hand, or use software.
(d) Write your name on your flowchart if you have drawn it by hand. If you have
used software, take a screenshot (print screen) of your flowchart and paste it
into MyPrograms_4293A.doc
(LO1)
3 Implement the program using an appropriate language.
4 When your program is complete, save your work as <YourName>1
5 You are going to test your program using a test table.
(a) Complete the test table below to show the output of your program using
normal values.
Test Input Expected Output Actual Output
(b) Take screenshot(s) (print screen) showing your code and output using normal
values. Paste your screenshot(s) into MyPrograms_4293A.doc
(LO2)
© UCLES 2019 4293/01A/J/19 [Turn over
6
Centre Number Candidate Number Name
On Track – Stage 2 – Programming for a Purpose
Section B
1 (a) Complete the test table below to show the output of your program from
question 4 using extreme and erroneous values.
Test Input Expected Output Actual Output
(b) Take screenshot(s) (print screen) showing your code and output using
extreme and erroneous values. Paste your screenshot(s) into
MyPrograms_4293A.doc
(LO4)
© UCLES 2019 4293/01A/J/19
7
Centre Number Candidate Number Name
On Track – Stage 2 – Programming for a Purpose
BLANK PAGE
© UCLES 2019 4293/01A/J/19 [Turn over
8
Centre Number Candidate Number Name
On Track – Stage 2 – Programming for a Purpose
2 A shop sells fruit for $2 per bag.
The shop has a special offer for customers who buy several bags of fruit:
Buy 5 bags of fruit – get 1 bag free
Buy 10 bags of fruit – get 3 bags free
There is no further discount for buying more than 10 bags of fruit.
For example, the price of
• 2 bags of fruit is $4
• 6 bags of fruit is $10 (the customer pays for 5 bags × $2, gets 1 bag free)
• 12 bags of fruit is $18 (the customer pays for 9 bags × $2, gets 3 bags free).
The shop writes the interactive program below to calculate the total price that a
customer will pay for buying bags of fruit.
© UCLES 2019 4293/01A/J/19
9
Centre Number Candidate Number Name
On Track – Stage 2 – Programming for a Purpose
The program contains two errors.
Identify these errors and explain how each error can be corrected.
(LO5)
© UCLES 2019 4293/01/A/J/19
10
On Track – Stage 2 – Programming for a Purpose
BLANK PAGE
Copyright © UCLES, 2019
Cambridge Assessment International Education is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of the University of
Cambridge Local Examinations Syndicate (UCLES), which itself is a department of the University of Cambridge.
Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the
publisher will be pleased to make amends at the earliest possible opportunity.
© UCLES 2019 4293/01A/J/19