Practise 25 exam-style questions on Inputs, processes, outputs and structure diagrams for OCR GCSE Computer Science (Paper 2). Write your answer as you would in the exam and get it marked in seconds against the mark scheme, point by point, with the Study Helper on hand if you get stuck.
25 questions
1–6 marks each
Instant marking
No sign-up needed
20 questions, marked as you go
Sample questions with model answers
Here are 4 of the questions in this topic, each with a model answer, an explanation of why it earns the marks and the mark scheme an examiner would use.
Question 1
2 marks
Describe what a structure diagram shows.
Model answer
A structure diagram shows how a problem is decomposed into smaller sub-sections. The whole problem is the box at the top, and each level below breaks a box down into smaller parts, with lines linking each box to its sub-sections.
Explanation
A structure diagram is a picture of decomposition. It is drawn top-down: the whole system at the top, then its main parts, then the smaller tasks that make up each part. It does not show the order things happen in or any decisions - that is what a flowchart does.
Mark scheme
1 mark
How a problem / system is broken down (decomposed) into smaller sub-sections / modules / sub-problems
Accept 'the structure of a problem'.
1 mark
The sub-sections are shown as boxes in levels / a hierarchy (top-down), with lines linking each box to the sub-sections it is made up of
Accept 'the whole system is at the top and each level below shows smaller parts'. Do not accept 'shows the order in which the steps are carried out' (that is a flowchart).
Question 2
2 marks
Explain how a structure diagram can help a programmer decide which sub programs to write.
Model answer
Each box in a structure diagram, especially those at the bottom level, is a small, self-contained task. Each of these tasks can be written as its own function or procedure.
Explanation
The bottom-level boxes of a structure diagram are tasks small enough to code directly, so each one is a natural sub program, and the higher-level boxes become sub programs that call them. If the same task appears in more than one place, it only needs to be written once and reused.
Mark scheme
1 mark
Each box / sub-section (especially at the bottom level) is a small, separate task
1 mark
so each one can be written as its own sub program (function / procedure)
Accept 'boxes that appear more than once / are similar can be written as one sub program and reused' as an alternative for this mark.
Question 3
3 marks
A reaction-time game shows the word GO on the screen after a random wait of between 2 and 5 seconds. The player presses the space bar as soon as they see GO. The program works out the player's reaction time, compares it with the best time so far, and displays the reaction time and the message "New best!" if it is the fastest.
Identify three processes that the program carries out.
Model answer
1. Generate a random wait time from 2 to 5 seconds. 2. Calculate the reaction time as the time the space bar was pressed minus the time GO appeared. 3. Compare the reaction time with the best time so far, and update the best time if it is faster.
Explanation
Processes are what the program does with data, between taking inputs and producing outputs. Here they include making the random wait, calculating the reaction time and comparing it with the best time. Pressing the space bar is an input and showing GO or the message is an output, so these do not count as processes.
Mark scheme
1 mark
First valid process, e.g. generate a random wait time (from 2 to 5 seconds)
Valid processes: generate / choose a random wait time; wait / time the delay before showing GO; record the time GO is shown and the time the space bar is pressed; calculate the reaction time (time pressed - time GO was shown); compare the reaction time with the best time; update / store the best time if the new time is faster. Do not accept inputs (pressing the space bar) or outputs (displaying GO, the time or 'New best!') as processes.
1 mark
Second, different valid process, e.g. calculate the reaction time
Each process must be a different idea.
1 mark
Third, different valid process, e.g. compare the reaction time with the best time
If more than three are given, credit the best three.
Question 4
4 marks
A weather station records the air temperature every hour for 24 hours. At the end of the day, its program outputs the highest temperature, the lowest temperature and the mean (average) temperature for that day.
Identify the inputs, processes and outputs of the program.
Model answer
Input: the 24 hourly temperature readings from the sensor. Processes: compare the readings to find the highest and lowest temperatures; add up all 24 readings and divide the total by 24 to find the mean. Outputs: the highest, lowest and mean temperatures.
Explanation
The only input is the set of temperature readings, which come from a sensor rather than a keyboard. The processes are the calculations: finding the highest and lowest by comparing readings, and finding the mean by totalling and dividing by 24. The outputs are the three results the station reports at the end of the day.
Mark scheme
1 mark
Input: the 24 (hourly) temperature readings (from a sensor)
Do not accept 'the sensor' on its own.
1 mark
Process: find the highest and / or the lowest temperature (by comparing each reading)
1 mark
Process: calculate the mean: add up the 24 readings and divide the total by 24
Accept 'calculate the average'. Do not award two process marks for the same calculation.
1 mark
Outputs: the highest, lowest and mean temperatures
All three outputs needed for this mark.
Ready to try the rest? Every answer you write is marked against the mark scheme, so you can see exactly where the marks are.
Ctrl + Enter to check
Study HelperHints first, answers after you try
Stuck on this one? Ask for a hint and I’ll point you in the right direction, without giving the answer away. Once you’ve checked your answer, I’ll show you how the marks are awarded.