Specimen QP - Paper 2 OCR Computer Science GCSE - Exercise 8g
Specimen QP - Paper 2 OCR Computer Science GCSE - Exercise 8g
18
(g) The teacher asks students how long they spend completing homework. Students answer in
minutes and hours (for example 2 hours 15 minutes).
The teacher would like to create an algorithm that will display students’ inputs in minutes only.
(i) Identify the input and output required from this algorithm.
Input …….………………………………………………………………………………………………
……...……………………………………………………………………………………………………
Output …..………………………………………………………………………………………………
…….………………………………………………………………………….……………………........
[2]
(ii) A program is created to convert hours and minutes into a total number of minutes.
finalTotal = ………………………………………………………………..
print(finalTotal)
function ………………………………………………………………..
………………………………………………………………..
………………………………………………………………..
………………………………………………………………..
………………………………………………………………..
endfunction
[4]
© OCR 2019
PMT
19
(iii) The following flowchart outputs a message depending on how long each person has spent
playing computer games.
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
[4]
© OCR 2019