22 Algorithms MCQs v2
22 Algorithms MCQs v2
Computer Science
MCQs and answers
Oxford Cambridge and RSA
Lessons 1 and 2
Question 13: Which error may produce unexpected results in a program? (1-3) ü
Linear
Sum
Logic
Syntax
Question 14: Which error may stop a program from compiling? (4-6) ü
Logic errors
Input errors
Run time errors
Syntax errors
MCQs
Lessons 3, 4 and 5
6 12 1 8 3
1 3 6 8 12
6 8 1 12 3
Question 7: Which sorting algorithm needs to go through the list repeatedly? (4-6) ü
Filter
Bubble
Insertion
None of them do
Question 8: Which sorting algorithm splits a list of items into individual values? (1-2) ü
Merge
Bubble
Insertion
None of them do
Question 9: Which sorting algorithm takes an item from the list, and puts it in the ü
correct place in a sorted list? (1-3)
Merge
Bubble
Insertion
None of them do
MCQs
Lessons 6 and 7
Input/Output
Output
Start/Stop
Decision
Question 3: Identify the purpose of the following flowchart symbol: (1-3)
Input/Output
Sub program
Process
Decision
Question 4: Identify the purpose of the following flowchart symbol: (1-2)
ü
Input/Output
Sub program
Process
Decision
Question 5: Identify the purpose of the following flowchart symbol: (1-3)
ü
Process
Input/Output
Sub program
Decision
Process
Input/Output
Sub program
Decision
Question 7: How many arrows should come out of a decision symbol in a
flowchart? (1-2) ü
0
1
2
3
Question 8: The following algorithm should take as input and add together two
numbers, outputting the result. ü
Identify the correct algorithm. (7-9)
num1 = input("Enter the first number")
num2 – input("Enter the second number")
num3 = num1 + num2
print(num3)
num1 = input("Enter the first number")
num2 = input("Enter the second number")
num3 = num1 + num2
print(num3)
num1 = input("Enter the first number")
num3 = input("Enter the second number")
num3 = num1 + num2
print(num3)
num1 = input("Enter the first number")
num2 = input("Enter the second number")
num3 = num1 + num2
print(num2)
Question 9: The following algorithm should take a number as input, and output the
12 times table for that number. ü
Identify the correct algorithm. (9)
number = input("Enter a number")
for x = 1 to 12
print(number * x)
next x
number = input("Enter a number")
for x = 0 to 12
print(number * x)
next x
number = input("Enter a number")
for x = 1 to 12
print(number X x)
next x
number = input("Enter a number")
for x = 1 to 12
print(number * number)
next x
Question 10: The following algorithm should take as input two numbers, add them
together, multiply the answer by 11, add 4, then divide by 2. It should output the result. ü
Identify the correct algorithm. (9)
number = input("Enter a number")
number = input("Enter the second number")
final = (((number + number) * 11) + 4) / 2
print (final)
number = input("Enter a number")
number2 = input("Enter the second number")
final = (((number + number2) * 11) + 4) * 2
print (final)
number = input("Enter a number")
number2 = input("Enter the second number")
final = number + number2 + 4 * 11 / 2
print (final)
number = input("Enter a number")
number2 = input("Enter the second number")
final = (((number + number2) * 11) + 4) / 2
print (final)
MCQs ANSWERS
Lessons 1 and 2
Question 13: Which error may produce unexpected results in a program? (1-3) ü
Linear
Sum
Logic ü
Syntax
Question 14: Which error may stop a program from compiling? (4-6) ü
Logic errors
Input errors
Run time errors
Syntax errors ü
MCQs ANSWERS
Lessons 3, 4 and 5
6 12 1 8 3
1 3 6 8 12
6 8 1 12 3
Question 7: Which sorting algorithm needs to go through the list repeatedly? (4-6) ü
Filter
Bubble ü
Insertion
None of them do
Question 8: Which sorting algorithm splits a list of items into individual values? (1-2) ü
Merge ü
Bubble
Insertion
None of them do
Question 9: Which sorting algorithm takes an item from the list, and puts it in the ü
correct place in a sorted list? (1-3)
Merge
Bubble
Insertion ü
None of them do
MCQs ANSWERS
Lessons 6 and 7
Input/Output
Output
Start/Stop ü
Decision
Question 3: Identify the purpose of the following flowchart symbol: (1-3)
Input/Output ü
Sub program
Process
Decision
Question 4: Identify the purpose of the following flowchart symbol: (1-2)
ü
Input/Output
Sub program ü
Process
Decision
Question 5: Identify the purpose of the following flowchart symbol: (1-3)
ü
Process ü
Input/Output
Sub program
Decision
Process
Input/Output
Sub program
Decision ü
Question 7: How many arrows should come out of a decision symbol in a ü
flowchart? (1-2)
0
1
2 ü
3
Question 8: The following algorithm should take as input and add together two
numbers, outputting the result. ü
Identify the correct algorithm. (7-9)
num1 = input("Enter the first number")
num2 – input("Enter the second number")
num3 = num1 + num2
print(num3)
num1 = input("Enter the first number")
num2 = input("Enter the second number")
ü
num3 = num1 + num2
print(num3)
num1 = input("Enter the first number")
num3 = input("Enter the second number")
num3 = num1 + num2
print(num3)
num1 = input("Enter the first number")
num2 = input("Enter the second number")
num3 = num1 + num2
print(num2)
Question 9: The following algorithm should take a number as input, and output the
12 times table for that number. ü
Identify the correct algorithm. (9)
number = input("Enter a number")
for x = 1 to 12
ü
print(number * x)
next x
number = input("Enter a number")
for x = 0 to 12
print(number * x)
next x
number = input("Enter a number")
for x = 1 to 12
print(number X x)
next x
number = input("Enter a number")
for x = 1 to 12
print(number * number)
next x
Question 10: The following algorithm should take as input two numbers, add them
together, multiply the answer by 11, add 4, then divide by 2. It should output the result. ü
Identify the correct algorithm. (9)
number = input("Enter a number")
number = input("Enter the second number")
final = (((number + number) * 11) + 4) / 2
print (final)
number = input("Enter a number")
number2 = input("Enter the second number")
final = (((number + number2) * 11) + 4) * 2
print (final)
number = input("Enter a number")
number2 = input("Enter the second number")
final = number + number2 + 4 * 11 / 2
print (final)
number = input("Enter a number")
number2 = input("Enter the second number")
ü
final = (((number + number2) * 11) + 4) / 2
print (final)
OCR is part of Cambridge University Press & Assessment, a department of the University of Cambridge.
For staff training purposes and as part of our quality assurance programme your call may be recorded or monitored. © OCR 2022 Oxford Cambridge and
RSA Examinations is a Company Limited by Guarantee. Registered in England. Registered office The Triangle Building, Shaftesbury Road, Cambridge, CB2 8EA.
Registered company number 3484466. OCR is an exempt charity.
OCR operates academic and vocational qualifications regulated by Ofqual, Qualifications Wales and CCEA as listed in their qualifications registers including A Levels,
GCSEs, Cambridge Technicals and Cambridge Nationals.
OCR provides resources to help you deliver our qualifications. These resources do not represent any particular teaching method we expect you to use. We update
our resources regularly and aim to make sure content is accurate but please check the OCR website so that you have the most up to date version. OCR cannot be
held responsible for any errors or omissions in these resources.
Though we make every effort to check our resources, there may be contradictions between published support and the specification, so it is important that you
always use information in the latest specification. We indicate any specification changes within the document itself, change the version number and provide a
summary of the changes. If you do notice a discrepancy between the specification and a resource, please contact us.
You can copy and distribute this resource freely if you keep the OCR logo and this small print intact and you acknowledge OCR as the originator of the resource.
OCR acknowledges the use of the following content: N/A
Whether you already offer OCR qualifications, are new to OCR or are thinking about switching, you can request more information using our Expression of Interest form.
Please get in touch if you want to discuss the accessibility of resources we offer to support you in delivering our qualifications.