Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Y11 CS Paper 2 2022 - mmd

Total questions: 80

Worksheet time: 51mins

Name
Class
Date
1.

Define what is meant by computational thinking

a)

Looking for similarities

b)

Breaking a problem into smaller sub problems

c)

Removing unnecessary detail

d)

Using a computer to solve problems

2.

Define what is meant by abstraction

a)

Looking for similarities

b)

Breaking a problem into smaller sub problems

c)

Removing unnecessary detail

d)

Using a computer to solve problems

3.

Define what is meant by decomposition

a)

Looking for similarities

b)

Breaking a problem into smaller sub problems

c)

Removing unnecessary detail

d)

Using a computer to solve problems

4.

Define what is meant by an algorithm

a)

Looking for similarities

b)

Breaking a problem into smaller sub problems

c)

Step by step instructions to solve a problem

d)

Using a computer to solve problems

5.

What is Pattern Recognition?

a)

Looking for similarities within problems

b)

Breaking down a complex problem into smaller parts.

c)

Focusing on the important information only.

d)

Developing a step by step solution to the problem.

6.

Look at the Algorithm Below. In the corresponding Trace Table, what value should 'A' be?

a)

1

b)

3

c)

5

d)

7

7.

Look at the Algorithm Below. In the corresponding Trace Table, what value should 'C' be?

a)

1

b)

3

c)

8

d)

13

8.
Which of these pseudocode statements is an example of a logic error?
a)
FOR x=0 TO 10 STEP -1
b)
FOR x=0 TO 10 STEP 1
c)
FOR x=10 TO 0 STEP -1
d)
FOR x=0 TOO 10 STEP 1
9.
Which of these pseudocode statements contains a syntax error?
a)
pounds = pence x 100
b)
pounds = pence * 100
c)
pounds = pence / 100
d)
pounds = 100 / pence
10.
Which statement best describes logic errors?
a)
An error in a program that causes it to produce incorrect ouputs but not a crash.
b)
An error in a program that causes it to crash.
c)
An error in the program caused by mis-spelt instructions.
d)
An error in a program caused by hardware failure.
11.

Which flowchart shape is this?

a)

Decision Box

b)

Input / Output box

c)

Process box

d)

Start / Stop box

12.

Which flowchart shape is this?

a)

Decision Box

b)

Input / Output box

c)

Process box

d)

Start / Stop box

13.

Which flowchart shape is this?

a)

Decision Box

b)

Input / Output box

c)

Process box

d)

Start / Stop box

14.

Which flowchart shape is this?

a)

Decision Box

b)

Input / Output box

c)

Process box

d)

Start / Stop box

15.

We need variables to:

a)

store and manipulate data.

b)

store data.

c)

manipulate data.

d)

make fun of students.

16.

When a piece of code runs unintentionally forever it is known as

a)

An infinite loop

b)

A long loop

c)

A broken loop

d)

A for loop

17.

Which are the lines that contains errors

a)

3,4,6,7

b)

5,6,7,9

c)

5,6,8,9

d)

2,3,4,9

18.

IF statement is a ___________________________ statement?

a)

Assignment

b)

Sequence

c)

Selection

d)

Loop

e)

Honestly , I don't know

19.
Which is the correct way to get the user to enter a value when written as pseudocode?
a)
input (“Please enter the length”)
b)
length == input ("Please enter the length")
c)
length = (“Please enter the length”)
d)
length = input (“Please enter the length”)
20.

"A conditional statement to deal with many possible outcomes" describes which pseudocode programming statement?

a)

FOR...TO...NEXT

b)

IF...THEN...ELSE...END IF

c)

WHILE...DO...ENDWHILE

d)

REPEAT...UNTIL

e)

CASE...OF...OTHERWISE...ENDCASE

21.

What does the code output?

a)

0

1

2

3

b)

1

2

3

c)

0

1

2

d)

2

1

0

22.

What does the code output?

a)

3

4

5

b)

1

2

3

c)

3

4

5

6

d)

3

4

4

23.

What does this program output?

a)

x is 0

b)

x is 1

c)

x is 3

d)

x is 4

24.
A linear search is to be performed on the list:
12   6   8  1  3
How many comparisons would it take to find number 1?
a)
1
b)
2
c)
3
d)
4
25.
A binary search is to be performed on the list:
3  5  9  10  23
How many comparisons would it take to find number 9?
a)
0-1
b)
2-3
c)
4-5
d)
I can't find the number 9
26.
A binary search is to be performed on the list:
1  5  10  13  48  68  100  101
How many comparisons would it take to find number 101?
a)
0-1
b)
1-2
c)
3-4
d)
4-5
27.
Describe an advantage of a linear search algorithm
a)
Data does not need to be in order.
b)
Performs well over large ordered lists.
c)
Can only work on an ordered list.  If unordered must use a linear search.
d)
Slow with large data sets.
28.

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/run through the list?

a)

6 8 1 3 12

b)

6 12 1 8 3

c)

1 3 6 8 12

d)

6 8 1 12 3

29.

What is one disadvantage of using Merge Sort?

a)

Sorts ordered and unordered lists

b)

Creating sublists uses more memory

c)

Slower than bubble and insertion sort

d)

Doesn't work well on long lists

30.

State one disadvantage of the Bubble Sort algorithm

a)

It uses lots of memory

b)

It's complicated

c)

It's hard to code

d)

It's slow

31.

State 3 advantages of the Insertion Sort algorithm.

a)

Works well on large lists

b)

Simple

c)

Quick way to check if a list is in order

d)

Doesn't use much memory

32.

during the SECOND comparison of the final stage, the two numbers compared are _ and _

a)

2 and 2

b)

1 and 2

c)

6 and 7

d)

2 and 4

33.

How do merge sorts work?

a)

They split the list to single elements before piecing them back together, one sublist at a time.

b)

Taking one item at a time from an unsorted list, each new item is compared with the previous until its place is found.

c)

Each item in the list is compared with the following item starting with the last value till the first.

d)

Each item in the list is individually compared with the following item starting with the first value till the last.

34.
Which Data Type would you use for this data?
15
a)
String
b)
Integer
c)

Float

d)
Boolean
35.
Which Data Type would you use for this data?
England
a)
String
b)
Integer
c)

Float

d)
Boolean
36.
Which Data Type would you use for this data?
14.3
a)
String
b)
Integer
c)

Float

d)
Boolean
37.
Which Data Type would you use for this data?
Yes/No
a)
String
b)
Integer
c)

Float

d)
Boolean
38.

Which of these is the correct code for creating a list of names?

a)

nameList = John, Harry, Jesse, John, Harry, Harry

b)

nameList = ("John", "Harry", "Jesse", "John", "Harry", "Harry")

c)

nameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"]

d)

nameList = [John, Harry, Jesse, John, Harry, Harry]

39.

Which of these pieces of code would return the name "Harry" from the following list?

nameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"]

a)

nameList()

b)

nameList[1]

c)

NameList(4)

d)

nameList["4"]

40.

Consider this list, what will be the highest index the list can have:

li=[1,2,3,4,5]

a)

2

b)

3

c)

4

d)

5

41.

Output of this code?

a)

[2,4,6,8,10]

b)

['2','4','6','8','10']

c)

[0,2,4,6,8]

d)

[10,8,6,4,2]

42.
Which of the following is not a method of opening files?
a)
Replace
b)
Append
c)
Write
d)
Read
43.
What is the data type of data read from a file?
a)
String
b)
Integer
c)
Real
d)
Boolean
44.

filename="example.txt"

with open(filename, "w") as myfile:

myfile.write("Pershendetje")

What happens here?

a)

a file called 'example' is being read

b)

a file called 'example' is created and some text is saved in it.

c)

The text in the 'example' file is assigned to a variable

d)

a variable called filename is created and it's value is printed on a file

45.

Mode in the following program to open file for writing in a mode where new data will be added at the end of old data


file =open("poem.txt","__")

a)

r

b)

a

c)

w

d)

x

46.

Choose the correct statement to close a file stream named myfile:

a)

myfile.terminate()

b)

myfile.end()

c)

myfile.close()

d)

myfile.remove()

47.

Which of the following is the SQL keyword to make changes to a database table or field

a)

SELECT

b)

SET

c)

INSERT INTO

d)

ALTER

48.

To sort the results in a query, which is the correct SQL keyword to use

a)

GROUP BY

b)

SORT BY

c)

ORDER BY

d)

GROUP WHERE

49.

With SQL, how do you select all the columns from a table named "Persons"?

a)

SELECT * FROM Persons  

b)

SELECT *.Persons

c)

SELECT Persons

d)

SELECT [all] FROM Persons

50.

Which of the following is an advantage of using local variables?

a)

They allow the variable to be used throughout the whole program

b)

They allow variable identifiers to be reused each time

c)

They are easier to program than global variables

d)

A wider range of data types can be used

51.

What term is used to describe data passed into/out of a program?

a)

Variable

b)

Loop

c)

Constant

d)

Parameter

52.

Leo wants to create a subroutine that will roll a dice. Which syntax is correct?

a)

def dice roll ():

b)

def diceroll ()

c)

def diceroll ():

d)

def diceroll []:

53.

What is the difference between a subroutine and a function?

a)

They are the same thing

b)

A subroutine passes values back out to the program, a function does not

c)

A function passes values back out to the program, a subroutine does not

d)

A function can run without being called

54.

What will be the output of this program if the user enters "Han" and then "Solo"?

a)

An error

b)

Nothing

c)

first surname

d)

Han Solo

55.

Which of the following are part of maintainability?

a)

Comments, indentation and verification

b)

Comments, sensible variable names and verification

c)

Comments, sensible variable names and indentation

d)

Comments, sensible names, syntax, run time

56.

What is the purpose of validation?

a)

To ensure that data entered is sensible and possible

b)

To ensure that data entered is correct

c)

To ensure that the programmer has met all requirements

d)

To ensure that the program is correct

57.

Which of the following are validation techniques?

a)

Presence check, length check, verification check

b)

Presence check, format check, range check

c)

Presence check, range check, verification check

d)

Presence check, valid check, format check

58.
Which of the following is not a type of test data?
a)
Check
b)
Valid
c)
Invalid
d)
Borderline
59.
Which of the following should be used to carry out an invalid test on the input of a person's age?
a)
-10
b)
10
c)
110
d)
0
60.
Which of the following would be used for a normal test of an input for the price of an item?
a)
1.99
b)
1,99
c)
-5.12
d)
10 pounds
61.

What is the boolean expression for this logic circuit?

a)

Q = NOT (A OR B)

b)

Q = NOT A AND B

c)

NOT A OR B = Q

d)

Q = (NOT A) OR B

62.

This is the truth table for which logic gate?

a)
b)
c)
63.

In this logic circuit, if A = 0 and Q = 1, what is B?

a)

0

b)

We can't say

c)

1

64.

In this logic circuit, what is Q if the inputs are: A=0, B=1, C=0?

a)

0

b)

We can't say

c)

1

65.

What is the best explanation for why a computer uses boolean logic to manipulate True and False values?

a)

It can only understand 0s and 1s

b)

It runs instructions in a binary code

c)

It doesn't have enough memory to store numbers above 1

d)

It uses transistors which can only be on or off

66.

Which of these are boolean operators, implemented in the computer as logic gates?

Check all that apply

a)

NOT

b)

MOD

c)

OR

d)

AND

e)

DIV

67.

What is the output?

a)

1

b)

0

c)

2

d)

ERROR

68.

What is the output?

a)

0

b)

1

c)

2

d)

ERROR

69.

What is the correct expression?

a)

Any of these could be used

b)

A + B + C + D = X

c)

A ∧ B ∨ C ∧ D = X

d)

(A ∧ B) ∨ (C ∧ D) = X

70.

What is the output if the following is used:

(A ∧ B) ∨ C = X

A=1

B=0

C=0

a)

1

b)

0

c)

2

d)

OR

71.

Which of the following is NOT an example of a higher level language

a)

Python

b)

Ruby

c)

Java

d)

Fortran

72.

Which letter represents the right level of programming

a)

A is Low-level Programming

b)

B is High-level programming

c)

A is High level Programming

d)

B is low level programing

73.

The fundamental language of the computer is called……………………………….. language ?

a)

Machine

b)

Python

c)

Ruby

d)

Scratch

74.

Resolving errors in a program is known as

a)

Debugging

b)

Refixing

c)

Error Checking

d)

Problem Solving

75.

The two categories of low level language are...

a)

Machine Code & Assembly

b)

Machine Code & Algorithms

c)

Assembly & Algorithms

d)

Algorithms & Binary

76.

Low level programming languages are... [2 answers]

a)

Easy to read, understand and modify

b)

Difficult to read, understand and modify

c)

Very simple to understand

d)

More memory efficient than high-level languages

77.

Which tool offers syntax highlighting?

a)

Editor

b)

Interpreter

c)

Debugger

d)

Runtime environment

78.

An IDE component that translates the source code into machine code is called ..........

a)

the runtime environment

b)

a debugging tool

c)

a translator (an interpreter or a compiler)

d)

an editor

79.

An IDE component that helps a programmer to locate and correct errors is called ..........

a)

the runtime environment

b)

a debugging tool

c)

a translator (an interpreter or a compiler)

d)

an editor

80.

What type of logic is this table showing:

a)

AND

b)

OR

c)

NOR

d)

XOR