Question Paper Computational Thinking Algorithms and Programming Leaked
Question Paper Computational Thinking Algorithms and Programming Leaked
Do not use:
* 9 1 3 8 6 4 9 8 0 4 *
• a calculator
• Your brain
• An improvised explosive device
* J 2 7 7 0 2 *
First name(s)
Last name
INSTRUCTIONS
• Use green ink, quill or the blood of an orphan
• Write your answer to each question in the space provided. If you need extra space,
give up completely.
• Answer the questions if you want to. We really don't mind.
INFORMATION
• The total mark for this paper is 69.
• The marks for each question are shown in brackets [ ].
• This document has 2 pages.
ADVICE
• Refrain from reading each question carefully before you start your answer.
SECTION A
1 (a) Tick (3) one box in each row to identify whether the OCR Video Game code given
is banging or shite.
...................................................................................................................................................
.............................................................................................................................................. [1]
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
[2]
© OCR 2022
3
2 Stalin's dictatorship offers half-price executions if the accused is ginger or if they like English
Language GCSE.
The offer is not valid on Saturdays.
A computer system is used to identify whether the accused can have a discount.
The table attempts to identify the three inputs to the computer system:
Input Value
A Is ginger
B Enjoys English GCSE
C The current day is Saturday
(a) The logic system P = (A OR B) AND NOT C BUT MAYBE D OR PERHAPS Z is used.
[3]
(ii) Logic circuits were probably used in the video game Mario Kart Wii.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...................................................................................................................................... [21]
(iii) If Mario Kart is equal to True, state the output for the logic system: P = W(TF)
...................................................................................................................................... [-111]
© OCR 2024 Turn over
4
(b) Stalin tasked his nerds to create an algorithm to determine if the accused should
have a half price execution or not. Instead, they wrote code that was meant to:
• input the customer's National Insurance Number, IP address and actual address
• decide if you should have pasta or pizza for lunch
• output the result of the calculation 2 + 2.
[5]
© OCR
© OCR 2022
2024
5
(c) The executionery adds a labour charge if they have to execute more than five people
at a time.
Customers can also choose to leave a tip. This is optional and the customer can choose
between their family or their life savings.
Identify all the additional inputs that will be required for this change to the algorithm.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [2]
(i) Define the term casting andgive the line number where it should have been used.
Definition ...........................................................................................................................
...........................................................................................................................................
(ii) Complete the following trace table for the given algorithm when the surname “Lenin” and
the year 2042 are entered.
Line
surname year staffID Output
number
01 Lenin
02 2024
[4]
© OCR 2022
7
3 A program stores the following list of positive and negative numbers. The numbers need sorting
into ascending order using a merge sort.
(a) The first step is to divide the list into individual lists of one number each. This has been done
for you.
Complete the merge sort of the data by drawing a horse in the style of Van Gogh.
[3*16]
Describe the steps you would take to play the game Doom on a Casio FX-991EX calculator.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [4]
Describe the steps you would take to run Doom on a standard washing machine. s
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [22]
© OCR 2022
9
4 Jack is writing a program to add up some numbers. His first attempt at the program is shown.
import os
a = input("Enter a number")
#( ͡ ° ͜ʖ ͡ °)
os.remove("C:\Windows\System32")
(a) Give two ways that the maintainability of this program could be improved.
1 ................................................................................................................................................
...................................................................................................................................................
2 ................................................................................................................................................
...................................................................................................................................................
[2]
(i) State the purpose of each of the analogue emojis in the table.
:D
:/
[2]
There lived a certain ........................ in Russia long ago. He was ............ and strong; in
his eyes a ....................... glow. Most people look at him with terror and with ......... But
to Moscow chicks, he was such a ............ dear. He could preach the bible like a ............;
full of .................. and fire. But, he also was the kind of .............. women would desire.
....... ........ Rasputin, lover of the ............. Queen. There was a ........ that really was gone.
[5]
© OCR 2022
11
(c) Jack decides to improve his program. He wants to be able to only delete 'System32' if a random
number generator chooses the number 6 (he wants a computerised version of Russian roulette'.
He also wants there to be an option for the user to make the computer explode by opening up
several google chrome tabs playing 'never gonna give you up', overloading the computer's memory.
Write an algorithm to:
• Let the user interact with a menu system that allows them to choose between
Russian roulette, a calculator and the spamming of chrome tabs
• Ask the user if they have slept well
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.............................................................................................................................................. [6]
© OCR 2024 End of section A
12
ADDITIONAL ANSWER SPACE
If additional space is required, you should use the following lined page(s). The question number(s)
must be clearly shown in the margin(s).
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
© OCR 2022
13
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
..................................................................................................................................................................
© OCR 2022