0% found this document useful (0 votes)
67 views2 pages

Specimen QP - Paper 2 OCR Computer Science GCSE - Exercise 8g

This document provides instructions for an algorithm that converts student homework times from hours and minutes into a total number of minutes. It includes: 1) Identifying the inputs of hours and minutes and output of total minutes. 2) An incomplete program that takes hour and minute inputs and calculates the total minutes, requiring a subprogram to be completed. 3) A flowchart that outputs a message depending on time spent playing games, requiring rewriting as a program.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views2 pages

Specimen QP - Paper 2 OCR Computer Science GCSE - Exercise 8g

This document provides instructions for an algorithm that converts student homework times from hours and minutes into a total number of minutes. It includes: 1) Identifying the inputs of hours and minutes and output of total minutes. 2) An incomplete program that takes hour and minute inputs and calculates the total minutes, requiring a subprogram to be completed. 3) A flowchart that outputs a message depending on time spent playing games, requiring rewriting as a program.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

PMT

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.

The teacher wants to create a sub program to perform the calculation.

The program has been started but is not complete.

Complete the design for the program.

hours = input("Please enter number of hours played")

minutes = input("Please enter number of minutes played")

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.

Rewrite the flowchart as a program.

You must use either:


• OCR Exam Reference Language, or
• a high-level programming language that you have studied.

…………………………………………………………………………………………………………

…………………………………………………………………………………………………………

…………………………………………………………………………………………………………

…………………………………………………………………………………………………………

…………………………………………………………………………………………………………

…………………………………………………………………………………………………………

…………………………………………………………………………………………………………

…………………………………………………………………………………………………………

…………………………………………………………………………………………………………

…………………………………………………………………………………………………………

…………………………………………………………………………………………………………

[4]

END OF QUESTION PAPER

© OCR 2019

You might also like