0% found this document useful (0 votes)
15 views17 pages

22 Algorithms MCQs v2

Uploaded by

tummyodeyemi
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)
15 views17 pages

22 Algorithms MCQs v2

Uploaded by

tummyodeyemi
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/ 17

GCSE (9–1)

Computer Science
MCQs and answers
Oxford Cambridge and RSA

Topic 2.1 – Algorithms


MCQs
The numbers after the question are an approximate estimation of relative difficulty, broadly based
around the new GCSE Numbering System. Please note that these are approximate and should be used
as a rough guide only. They are not meant to infer precise mapping to GCSE outcomes.

Lessons 1 and 2

Question 1: Identify the search algorithm: (1-3) ü


Spotlight search
Binary search
Denary search
Next Item search
Question 2: Identify the description of a linear search: (4-6) ü
Put the elements in order, start at the first item, check each item in turn
Put the elements in order, compare to the middle value, split the list in order and repeat
Elements do not need to be in order, check each item in turn
Elements do not need to be in order, compare to the middle value, split the list in order
and repeat
Question 3: Identify the description of a binary search: (4-5) ü
Put the elements in order, start at the first element, check each item in turn
Start with elements in order, compare to the middle value, split the list in half and repeat
Elements do not need to be in order, check each item in turn
Elements do not need to be in order, compare to the middle value, split the list in order
and repeat
Question 4: Which term is part of computational thinking? (1-3) ü
Using a computer
Developing an algorithm to solve a problem
Making a computer use artificial intelligence
Google is computational thinking
Question 5: Which of the following is not a component of computational thinking? (1-2) ü
Abstraction
Typing
Decomposition
Algorithmic thinking
Question 6: Define the term abstraction within computational thinking: (4-6) ü
Adding together numbers
Adding additional levels of detail to a problem to define it
Performing multiple calculations on a list of variables
Removing unnecessary details from a problem

Version 2 1 © OCR 2022


GCSE (9–1) Computer Science MCQs and answers

Question 7: Define the term decomposition within computational thinking: (1-3) ü


The breaking down of a program until it no longer exists
The creation of music that can be played on a computer
The breaking down of a problem into smaller problems
Adding detail to a solution to make it more complex
Question 8: Identify which statement describes algorithmic thinking: (1-3) ü
Thinking like a computer
Writing binary numbers
Identifying the steps involved in solving a problem
Identifying what problems need to be solved
Question 9: A linear search is to be performed on the list:
12 6 8 1 3 ü
How many comparisons would it take to find the number 1? (4-6)
1
2
3
4
Question 10: A binary search is to be performed on the numbers below:
3 5 9 10 23 ü
How many comparisons would it take to find the number 9? (4-6)
1
2-3
4-5
It can't find the number 9
Question 11: A binary search is to be performed on the following numbers:
1 5 10 13 48 68 100 101 ü
How many comparisons would it take to the find the number 101? (4-6)
1
2
3-4
4-5
Question 12: Identify the search performed by the following algorithm: (4-6)
for x = 0 to 9
if (array[x]==10) then ü
print("Found it")
endif
next x
Linear
Binary
Both linear and binary
Neither, it does not work

Version 2 2 © OCR 2022


GCSE (9–1) Computer Science MCQs and answers

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

Version 2 3 © OCR 2022


GCSE (9–1) Computer Science MCQs and answers

MCQs
Lessons 3, 4 and 5

Question 1: Which of the following is not a sorting algorithm? (1-3) ü


Bubble
Insertion
Binary
Merge
Question 2: Which sorting algorithm is described by: moving through a set of data ü
repeatedly, compares adjacent elements and swaps any in the wrong order? (1-2)
Merge
Bubble
Insertion
None of the above
Question 3: Split a list so that each value is in an individual list, then combine these ü
lists - two at a time - in the correct order, until all lists have been combined. (1-3)
Merge
Bubble
Insertion
None of the above
Question 4: Which sorting algorithm is described by: take each item in turn,
compare it to the items in the sorted list and place it in the ordered position in the ü
sorted list? (1-2)
Merge
Bubble
Insertion
None of the above
Question 5: The following two lists are to be merged using a merge sort. Which
element first goes into the new merged list? The lists are 0 indexed. (4-5)
List 1:
2 4 8 9 ü
List 2:
1 6 8 4
List 1 Item 0
List 2 Item 0
List 1 Item 1
List 2 Item 3

Version 2 4 © OCR 2022


GCSE (9–1) Computer Science MCQs and answers

Question 6: The following list is to be sorted using a bubble sort:


12 6 8 1 3 ü
What will the list look like after the first iteration through the list? (9)
6 8 1 3 12

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

Version 2 5 © OCR 2022


GCSE (9–1) Computer Science MCQs and answers

MCQs
Lessons 6 and 7

Question 1: Identify the correct definition for ‘algorithm’: (1-3) ü


A problem
A solution to a problem
The steps that are taken to solve a problem
The words to enter when typing
Question 2: Identify the purpose of the following flowchart symbol: (1-3)
ü

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

Version 2 6 © OCR 2022


GCSE (9–1) Computer Science MCQs and answers

Question 6: Identify the purpose of the following flowchart symbol: (1-2)

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)

Version 2 7 © OCR 2022


GCSE (9–1) Computer Science MCQs and answers

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)

Version 2 8 © OCR 2022


GCSE (9–1) Computer Science MCQs and answers

MCQs ANSWERS
Lessons 1 and 2

Question 1: Identify the search algorithm: (1-3) ü


Spotlight search
Binary search ü
Denary search
Next Item search
Question 2: Identify the description of a linear search: (4-6) ü
Put the elements in order, start at the first item, check each item in turn
Put the elements in order, compare to the middle value, split the list in order and repeat
Elements do not need to be in order, check each item in turn ü
Elements do not need to be in order, compare to the middle value, split the list in order
and repeat
Question 3: Identify the description of a binary search: (4-5) ü
Put the elements in order, start at the first element, check each item in turn
Start with elements in order, compare to the middle value, split the list in half and repeat ü
Elements do not need to be in order, check each item in turn
Elements do not need to be in order, compare to the middle value, split the list in order
and repeat
Question 4: Which term is part of computational thinking? (1-3) ü
Using a computer
Developing an algorithm to solve a problem ü
Making a computer use artificial intelligence
Google is computational thinking
Question 5: Which of the following is not a component of computational thinking? (1-2) ü
Abstraction
Typing ü
Decomposition
Algorithmic thinking
Question 6: Define the term abstraction within computational thinking: (4-6) ü
Adding together numbers
Adding additional levels of detail to a problem to define it
Performing multiple calculations on a list of variables
Removing unnecessary details from a problem ü

Version 2 9 © OCR 2022


GCSE (9–1) Computer Science MCQs and answers

Question 7: Define the term decomposition within computational thinking: (1-3) ü


The breaking down of a program until it no longer exists
The creation of music that can be played on a computer
The breaking down of a problem into smaller problems ü
Adding detail to a solution to make it more complex
Question 8: Identify which statement describes algorithmic thinking: (1-3) ü
Thinking like a computer
Writing binary numbers
Identifying the steps involved in solving a problem ü
Identifying what problems need to be solved
Question 9: A linear search is to be performed on the list:
12 6 8 1 3 ü
How many comparisons would it take to find the number 1? (4-6)
1
2
3
4 ü
Question 10: A binary search is to be performed on the numbers below:
3 5 9 10 23 ü
How many comparisons would it take to find the number 9? (4-6)
1 ü
2-3
4-5
It can't find the number 9
Question 11: A binary search is to be performed on the following numbers:
1 5 10 13 48 68 100 101 ü
How many comparisons would it take to the find the number 101? (4-6)
1
2
3-4 ü
4-5
Question 12: Identify the search performed by the following algorithm: (4-6)
for x = 0 to 9
if (array[x]==10) then ü
print("Found it")
endif
next x
Linear ü
Binary
Both linear and binary
Neither, it does not work

Version 2 10 © OCR 2022


GCSE (9–1) Computer Science MCQs and answers

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 ü

Version 2 11 © OCR 2022


GCSE (9–1) Computer Science MCQs and answers

MCQs ANSWERS
Lessons 3, 4 and 5

Question 1: Which of the following is not a sorting algorithm? (1-3) ü


Bubble
Insertion
Binary ü
Merge
Question 2: Which sorting algorithm is described by: moving through a set of data ü
repeatedly, compares adjacent elements and swaps any in the wrong order? (1-2)
Merge
Bubble ü
Insertion
None of the above
Question 3: Split a list so that each value is in an individual list, then combine these ü
lists - two at a time - in the correct order, until all lists have been combined. (1-3)
Merge ü
Bubble
Insertion
None of the above
Question 4: Which sorting algorithm is described by: take each item in turn,
compare it to the items in the sorted list and place it in the ordered position in the ü
sorted list? (1-2)
Merge
Bubble
Insertion ü
None of the above
Question 5: The following two lists are to be merged using a merge sort. Which
element first goes into the new merged list? The lists are 0 indexed. (4-5)
List 1:
2 4 8 9 ü
List 2:
1 6 8 4
List 1 Item 0
List 2 Item 0 ü
List 1 Item 1
List 2 Item 3

Version 2 12 © OCR 2022


GCSE (9–1) Computer Science MCQs and answers

Question 6: The following list is to be sorted using a bubble sort:


12 6 8 1 3 ü
What will the list look like after the first iteration through the list? (9)
6 8 1 3 12 ü

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

Version 2 13 © OCR 2022


GCSE (9–1) Computer Science MCQs and answers

MCQs ANSWERS
Lessons 6 and 7

Question 1: Identify the correct definition for ‘algorithm: (1-3) ü


A problem
A solution to a problem
The steps that are taken to solve a problem ü
The words to enter when typing
Question 2: Identify the purpose of the following flowchart symbol: (1-3)
ü

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

Version 2 14 © OCR 2022


GCSE (9–1) Computer Science MCQs and answers

Question 6: Identify the purpose of the following flowchart symbol: (1-2)

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)

Version 2 15 © OCR 2022


GCSE (9–1) Computer Science MCQs and answers

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)

Version 2 16 © OCR 2022


Need to get in touch? We really value your feedback
If you ever have any questions about OCR Click to send us an autogenerated email about
qualifications or services (including administration, this resource. Add comments if you want to.
logistics and teaching) please feel free to get in touch Let us know how we can improve this resource or
with our customer support centre. what else you need. Your email address will not be
used or shared for any marketing purposes.
Call us on
01223 553998 I like this I dislike this

Alternatively, you can email us on


support@ocr.org.uk I dislike this

For more information visit


Please note – web links are correct at date
ocr.org.uk/qualifications/resource-finder
of publication but other websites may
ocr.org.uk change over time. If you have any problems
/ocrexams with a link you may want to navigate to that
/ocrexams organisation’s website for a direct search.
/company/ocr
/ocrexams

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.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy