WorksheetsY11 CS Paper 2 2022 - mmd
Total questions: 80
Worksheet time: 51mins
Define what is meant by computational thinking
Looking for similarities
Breaking a problem into smaller sub problems
Removing unnecessary detail
Using a computer to solve problems
Define what is meant by abstraction
Looking for similarities
Breaking a problem into smaller sub problems
Removing unnecessary detail
Using a computer to solve problems
Define what is meant by decomposition
Looking for similarities
Breaking a problem into smaller sub problems
Removing unnecessary detail
Using a computer to solve problems
Define what is meant by an algorithm
Looking for similarities
Breaking a problem into smaller sub problems
Step by step instructions to solve a problem
Using a computer to solve problems
What is Pattern Recognition?
Looking for similarities within problems
Breaking down a complex problem into smaller parts.
Focusing on the important information only.
Developing a step by step solution to the problem.
Look at the Algorithm Below. In the corresponding Trace Table, what value should 'A' be?
1
3
5
7
Look at the Algorithm Below. In the corresponding Trace Table, what value should 'C' be?
1
3
8
13
Which flowchart shape is this?
Decision Box
Input / Output box
Process box
Start / Stop box
Which flowchart shape is this?
Decision Box
Input / Output box
Process box
Start / Stop box
Which flowchart shape is this?
Decision Box
Input / Output box
Process box
Start / Stop box
Which flowchart shape is this?
Decision Box
Input / Output box
Process box
Start / Stop box
We need variables to:
store and manipulate data.
store data.
manipulate data.
make fun of students.
When a piece of code runs unintentionally forever it is known as
An infinite loop
A long loop
A broken loop
A for loop
Which are the lines that contains errors
3,4,6,7
5,6,7,9
5,6,8,9
2,3,4,9
IF statement is a ___________________________ statement?
Assignment
Sequence
Selection
Loop
Honestly , I don't know
"A conditional statement to deal with many possible outcomes" describes which pseudocode programming statement?
FOR...TO...NEXT
IF...THEN...ELSE...END IF
WHILE...DO...ENDWHILE
REPEAT...UNTIL
CASE...OF...OTHERWISE...ENDCASE
What does the code output?
0
1
2
3
1
2
3
0
1
2
2
1
0
What does the code output?
3
4
5
1
2
3
3
4
5
6
3
4
4
What does this program output?
x is 0
x is 1
x is 3
x is 4
12 6 8 1 3
How many comparisons would it take to find number 1?
3 5 9 10 23
How many comparisons would it take to find number 9?
1 5 10 13 48 68 100 101
How many comparisons would it take to find number 101?
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?
6 8 1 3 12
6 12 1 8 3
1 3 6 8 12
6 8 1 12 3
What is one disadvantage of using Merge Sort?
Sorts ordered and unordered lists
Creating sublists uses more memory
Slower than bubble and insertion sort
Doesn't work well on long lists
State one disadvantage of the Bubble Sort algorithm
It uses lots of memory
It's complicated
It's hard to code
It's slow
State 3 advantages of the Insertion Sort algorithm.
Works well on large lists
Simple
Quick way to check if a list is in order
Doesn't use much memory
during the SECOND comparison of the final stage, the two numbers compared are _ and _
2 and 2
1 and 2
6 and 7
2 and 4
How do merge sorts work?
They split the list to single elements before piecing them back together, one sublist at a time.
Taking one item at a time from an unsorted list, each new item is compared with the previous until its place is found.
Each item in the list is compared with the following item starting with the last value till the first.
Each item in the list is individually compared with the following item starting with the first value till the last.
15
Float
England
Float
14.3
Float
Yes/No
Float
Which of these is the correct code for creating a list of names?
nameList = John, Harry, Jesse, John, Harry, Harry
nameList = ("John", "Harry", "Jesse", "John", "Harry", "Harry")
nameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"]
nameList = [John, Harry, Jesse, John, Harry, Harry]
Which of these pieces of code would return the name "Harry" from the following list?
nameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"]
nameList()
nameList[1]
NameList(4)
nameList["4"]
Consider this list, what will be the highest index the list can have:
li=[1,2,3,4,5]
2
3
4
5
Output of this code?
[2,4,6,8,10]
['2','4','6','8','10']
[0,2,4,6,8]
[10,8,6,4,2]
filename="example.txt"
with open(filename, "w") as myfile:
myfile.write("Pershendetje")
What happens here?
a file called 'example' is being read
a file called 'example' is created and some text is saved in it.
The text in the 'example' file is assigned to a variable
a variable called filename is created and it's value is printed on a file
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","__")
r
a
w
x
Choose the correct statement to close a file stream named myfile:
myfile.terminate()
myfile.end()
myfile.close()
myfile.remove()
Which of the following is the SQL keyword to make changes to a database table or field
SELECT
SET
INSERT INTO
ALTER
To sort the results in a query, which is the correct SQL keyword to use
GROUP BY
SORT BY
ORDER BY
GROUP WHERE
With SQL, how do you select all the columns from a table named "Persons"?
SELECT * FROM Persons
SELECT *.Persons
SELECT Persons
SELECT [all] FROM Persons
Which of the following is an advantage of using local variables?
They allow the variable to be used throughout the whole program
They allow variable identifiers to be reused each time
They are easier to program than global variables
A wider range of data types can be used
What term is used to describe data passed into/out of a program?
Variable
Loop
Constant
Parameter
Leo wants to create a subroutine that will roll a dice. Which syntax is correct?
def dice roll ():
def diceroll ()
def diceroll ():
def diceroll []:
What is the difference between a subroutine and a function?
They are the same thing
A subroutine passes values back out to the program, a function does not
A function passes values back out to the program, a subroutine does not
A function can run without being called
What will be the output of this program if the user enters "Han" and then "Solo"?
An error
Nothing
first surname
Han Solo
Which of the following are part of maintainability?
Comments, indentation and verification
Comments, sensible variable names and verification
Comments, sensible variable names and indentation
Comments, sensible names, syntax, run time
What is the purpose of validation?
To ensure that data entered is sensible and possible
To ensure that data entered is correct
To ensure that the programmer has met all requirements
To ensure that the program is correct
Which of the following are validation techniques?
Presence check, length check, verification check
Presence check, format check, range check
Presence check, range check, verification check
Presence check, valid check, format check
What is the boolean expression for this logic circuit?
Q = NOT (A OR B)
Q = NOT A AND B
NOT A OR B = Q
Q = (NOT A) OR B
This is the truth table for which logic gate?
In this logic circuit, if A = 0 and Q = 1, what is B?
0
We can't say
1
In this logic circuit, what is Q if the inputs are: A=0, B=1, C=0?
0
We can't say
1
What is the best explanation for why a computer uses boolean logic to manipulate True and False values?
It can only understand 0s and 1s
It runs instructions in a binary code
It doesn't have enough memory to store numbers above 1
It uses transistors which can only be on or off
Which of these are boolean operators, implemented in the computer as logic gates?
Check all that apply
NOT
MOD
OR
AND
DIV
What is the output?
1
0
2
ERROR
What is the output?
0
1
2
ERROR
What is the correct expression?
Any of these could be used
A + B + C + D = X
A ∧ B ∨ C ∧ D = X
(A ∧ B) ∨ (C ∧ D) = X
What is the output if the following is used:
(A ∧ B) ∨ C = X
A=1
B=0
C=0
1
0
2
OR
Which of the following is NOT an example of a higher level language
Python
Ruby
Java
Fortran
Which letter represents the right level of programming
A is Low-level Programming
B is High-level programming
A is High level Programming
B is low level programing
The fundamental language of the computer is called……………………………….. language ?
Machine
Python
Ruby
Scratch
Resolving errors in a program is known as
Debugging
Refixing
Error Checking
Problem Solving
The two categories of low level language are...
Machine Code & Assembly
Machine Code & Algorithms
Assembly & Algorithms
Algorithms & Binary
Low level programming languages are... [2 answers]
Easy to read, understand and modify
Difficult to read, understand and modify
Very simple to understand
More memory efficient than high-level languages
Which tool offers syntax highlighting?
Editor
Interpreter
Debugger
Runtime environment
An IDE component that translates the source code into machine code is called ..........
the runtime environment
a debugging tool
a translator (an interpreter or a compiler)
an editor
An IDE component that helps a programmer to locate and correct errors is called ..........
the runtime environment
a debugging tool
a translator (an interpreter or a compiler)
an editor
What type of logic is this table showing:
AND
OR
NOR
XOR
