Question 1(b)(ii) 2015 · May-June · Paper 21 · 7 marks
Reveal official mark-scheme answer
Official answer for Question 1
Part (b)
(ii)
- Declarations/comments for variables – at least 2
- Input (+ prompts) for hours, minutes, seconds
- Input (+ prompt) of personal best time
- Correct calculation of RaceTimeInSeconds (don’t allow use of ‘x’ for ‘*’)
- Output RaceTimeInSeconds
- Correct logic and output message for < personal best
- Correct logic and output message for > personal best
- Correct logic and output message for = personal best [max 7]
Show text version of question
Question 1
Part (b)
(ii)
Question 1
An algorithm is shown below in structured English. INPUT race time as hours, minutes and seconds CALCULATE race time in seconds STORE race time in seconds OUTPUT race time in seconds
Part (b)
Before the program is written, the design is amended.
The new design includes input of the runner’s current personal best marathon time (in seconds). The output will now also show one of the following messages: • “Personal best time is unchanged” • “New personal best time” • “Equals personal best time”
(ii)
Write program code for the new design. Visual Basic and Pascal: You should include the declaration statements for variables. Python: You should show a comment statement for each variable used with its data type. Programming language ............................................................................................................ ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ...............................................................................................................................................[7]
Question 4
Why this question appears here
92% 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 9608_s15_qp_21.pdf
