Font size
WorksheetsAQA Computer Science 8525 Giant Quizizz - Paper 1 (Python)
Total questions: 100
Worksheet time: 43mins
An algorithm is
sequence of steps to complete a task
instructions for a computer to follow
breaking a problem down into chunks
a flowchart
Breaking a problem down into a number of sub problems, so each sub-problem accomplishes a identifiable task, is called...
Decomposition
Abstraction
Analysis
Processing
Process of taking away or removing irrelevant characteristics in terms of the problem being solved in order to reduce it to something simpler to understand is called...
Decomposition
Abstraction
Analysis
Processing
What is the table called?
Testing Table
Trace Table
Truth Table
Technical Table
What should be the value in the yellow box?
1
3
4
5
When would this function return TRUE?
When the num is equal to 0
When the num is even
When the num is odd
When 2 = 0
What does MOD do?
finds the remainder when dividing two numbers
like division but returns a whole number or integer
divides the first value by the second value and returns a decimal
'powers of'
num is an example of a
parameter
constant
varied number
return value
The difference between a function and a procedure is that a function MUST
return a value
contain a loop
be passed a parameter
contain MOD
A value that doesn't change when the program is running is called a
variable
constant
loop
condition
> < = are all examples of
relational operators
mathematical operators
comparison statements
if statement controllers
The output would be...
true
false
Which type of loop runs a set number of times?
FOR loop
WHILE loop
DO UNTIL loop
Infinite loop
What would the output be from this piece of code?
0 1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
0 1 2 3 4 5 6 7 8 9
0 1 2 3 4 5 7 8 9 10
This loop would continue infinitely as it's missing a line of code. What is missing where the question mark is?
index = index + 1
index = 1
END LOOP
REPEAT LOOP
This loop is known as a
conditional controlled loop
count controlled loop
infinite loop
repeat loop
What would this pseudo code output?
0 1 2 3 4 5
1 2 3 4 5
0 1 2 3 4
0 1 2 3 4 5 6
A numeric value (1, 2, 3) without a decimal is called
an integer
a boolean
a real
a character
Which data type uses a floating point and is sometimes known as a float?
an integer
a boolean
a real
a character
Which data type can store a single, alphanumeric character? (includes letters, numbers or symbols)
an integer
a boolean
a real
a character
What two values can be represented in a boolean?
1 and 2
true and false
correct and wrong
ant and dec
What would the output be?
Fortnite
F
8
7
What would the output be?
John Smith
JohnSmith
JOHNSMITH
J Smith
A structure that contains many items of data of the same type is called
an array
a variable
a constant
a sorting list
What is the output?
4
5
6
7
Which sorting algorithm sorts an unordered list by comparing adjacent items?
Bubble
Merge
Binary
Quick
Which sorting algorithm sorts an unordered list by repeatedly dividing a list into two smaller lists until the size of each list becomes one. Also known as divide and conquer.
Bubble
Merge
Binary
Quick
Bubble Sort is (select two)
Simplest and easiest to code
Slowest
Fastest
More difficult to code
A linear search
starts at the beginning of the list and moves through each item one by one until it finds a matching value or gets to the end
looks at the middle term of a sorted list and compares it with the search value to dispose of half of the list
only works when you're looking for words and symbols
only works when you have an odd amount of values in a list/array
A binary search
starts at the beginning of the list and moves through each item one by one until it finds a matching value or gets to the end
looks at the middle term of a sorted list and compares it with the search value to dispose of half of the list
only works when you're looking for words and symbols
only works when you have an odd amount of values in a list/array
A logical error is where
your code won't run because you've typed something incorrectly
your code will run but won't do what you want it to do
your code will crash half way through running
an IDE will show you there's a problem
What are the two types of variables? Select two.
Local
Global
Quick
Accessible
Local variables
are used within a subroutine or loop, and are then discarded when they have completed their work
are used within the main program and can be used by any of the commands or subroutines in the program
Which type of test checks the highest and lowest acceptable numbers, and those just inside or outside the acceptable range?
Boundary Test
Erroneous Test
Beta Testing
Normal Test
A REPEAT UNTIL loop does a comparison
at the beginning of the code block
at the end of the code block
What is the name given to a variable called?
identifier
variable name
calling id
declared name
>
greater than
less than
equal to
not equal to
What are the two criteria that make a good algorithm?
Efficiency
Correctness
Selection
Iteration
FOR, WHILE and DO UNTIL are all examples of
Iteration
Selection
Sequence
Error Prevention
Which of these is an example of an IDE?
PHP
C#
Visual Studio
VB.Net
"Rubber Duck" is an example of which data type?
Integer
String
Boolean
Decimal/Real
Which of the following would be the most appropriate way of declaring a variable?
1HouseNumber
House Number
houseNumber
thePropertyorBuildingHouseNumber
There are two ways you can name variables - carSpeed or car_speed. What is it called when you remove the space but capitalise every word after the first word - carSpeed?
Upper Case
Snake Case
Lower Case
Camel Case
What is this boolean condition in plain English?
IF 30 < 20 THEN
If 30 is less than 20 then
If 30 is more than 20 then
If the user entered '4', what would be the output?
Home
About
Play Game
Settings
Exit
What would be the output of the following piece of pseudocode?
Option A
Option B
Select a loop that is a type of definite iteration
FOR
WHILE
DO UNTIL
A presence check
checks the data is a certain type
checks the data falls within a range
checks the field not left blank
checks the data matches a pattern
checks the data is a certain amount of characters
What is the technique in which the system checks data against a set of predetermined rules?
Validation
Verification
The error above is an example of what type of error?
Syntax Error
Runtime Error
Logical Error
The error above is an example of what type of error?
Syntax Error
Runtime Error
Logical Error
If we wanted to test to see if our code would accept the days in the month of November, which of the following would be an acceptable boundary test?
1, 30
0, 31
5, 25
2, 31
Which of these is NOT a type of IDE diagnostic tool?
Variable Tracing
Breakpoint
Step
Loop Recorder
Which of the following is a valid output from this function? (select all that apply)
2
5
7
0
error
Indexing starts at 0
OUTPUT Students[2][1]
English
Maths
Smith
Green
What is it called when you set values in an array, before you use the array?
Initialising an array
Starting an array
Building an array
Locating an array
SUBSTRING(2, 9, 'computer science')
mputer s
co
mputer
cmptrscec
What is this string handling operation called?
Substring
Concatenation
Conversion
Positioning
What would you expect to write where the question mark is...
RECORD Car
make : __?__
model : ___
num_doors : ___
price : ___
END RECORD
String
Integer
Car
Ford
Select the correct method for declaring a variable in Python
name = “Bob”
name == “Bob”
name as Int = "Bob"
"Bob" = name
Select the correct method for assigning a value to a variable in Python
score = 5
score == 5
score as Int = 5
5 = score
Select the correct method for obtaining a user input in Python
name = INPUT
name = input(“Enter an input”)
name = user_input[]
user_input - "Please enter your name"
Select the correct method for outputting data to the screen in Python 3.
OUTPUT "Hello World"
PRINT (Hello World)
print("Hello World")
print "Hello World"
What word would go in the empty space in Python
IF age > 18:
print("Tickets will be £20")
____ age > 12:
print("You get a student ticket at £10")
else:
print("Child tickets are £5")
else if
elif:
else if:
elif
Which of these would be the correct way of declaring a definite loop in Python?
for i in range(1,20):
while lives > 3:
for names 1 to 10:
while score is more than 10 { }
Which of these is the correct way to declare an array in Python?
scores = (10, 12, 11, 5)
scores = 10, 12, 11, 5
scores = [10, 12, 11, 5]
scores = {10, 12, 11, 5}
How would I retrieve the number 12 from the array?
scores = [10, 12, 11, 5]
print(scores[1])
print(scores[2])
print(scores)
print("NUMBER 12")
Correctly create a substring of the variable 'surname' in Python.
surname.substring(0,2)
substring(surname,0,2)
surname.break{0,2}
surname[0:2]
What would this do in Python?
chr(83)
Error
Store 83 in a variable
Turn 83 to '8' and '3'
Convert the ASCII 83 to 'S'
If I created a subroutine in Python what would I need in the gap?
____ VATcal(cost):
def
SUBROUTINE
sub
declare
Which line of Python would I need in the gap (orange line) to make this work?
total = item_cost + 12
total = item_cost + VATcal(item_cost)
total = item_cost + VAT
VATcal(item_cost)
This should print out the word "Bananas" 10 times... what have I done wrong?
Put the loop between 0,10 instead of 0,11
Not included a : on the end of line 1
print should be PRINT
Bananas doesn't need speech marks
What parameter should go on the blue line?
10
area
height
width
What is the error on line 2?
Colon missing :
Speech marks missing " "
print should be PRINT
print shouldn't have brackets
What is the error on line 4?
Colon missing :
Speech marks missing " "
PRINT should be print
print shouldn't have brackets
Which line contains an error?
1
2
3
4
What's the error?
else shouldn't have a :
Line 1 should be if answer == 35:
The indentation is wrong
35 should be in speech brackets
How many mistakes can you spot in this piece of code? (time has been extended for this question!)
2
3
4
5
What is the error on line 6?
multiplier should be in speech marks
str isn't a Python function
It's missing a bracket on the end )
You can't add two strings together
What would be the output?
Coke
Pizza
Ice Cream
Nothing
What is the correct way of creating a random number in Python?
random.randint(1,10)
RANDOM(1,10)
random.generate[1,10]
rand.om(10)
This is an example of creating what in Python?
Function
Procedure
Record
TypeCast
In Python variable names must NOT have ______
spaces
capital letters
underscores _
numbers
What would happen if you entered 'strawberry' as your password?
It would say "Welcome! You're logged in"
It would say "Sorry wrong password"
An error would occur
It would ask you to type in another password
What is NOT an advantage of using a function
Functions and procedures can be reused instead of repeating code
If changes are needed, they can be made to just one block of code
It is easier to organise the order in which the program runs
Functions make it easier for the programmer to code complicated problems
Which is the correct symbol to use in Python to add a comment?
"
@
#
_
What would you expect this code to do?
print each letter in the word one at a time
print the word "computing"
print i 8 times
print 1,2,3,4,5,6,7,8
What would this output?
An error
16
15
Computer Science
What's the smallest number I could enter that would return "Number is big"
99
100
101
102
Which of these could I enter to get my code to say "Thank You"
[8] [6]
[100] [50]
[12] [3]
[9] [120]
What would I write on line 4 to call the function 'hello' in Python
call "hello"
call hello("Bob")
hello("Bob")
hello(Bob)
What could I enter to get the code to say "Yep!"
Any odd number
Any even number
0
21
What does the % sign mean in Python?
DIV
MOD
divide
XOR
What would this code output?
colours
Blue, Green, Red
Green, Red, Pink
Green, Red
What is wrong with this Python code?
age should be in speech marks
no indentation
else doesn't need a colon :
should end with an endif
This is an example of
Iteration
Selection
Sequence
Variable Declaration
What would be a suitable error message to enter in our except?
Please enter an integer
You didn't enter anything
Please enter a string
Error in the code, please try again
Bonus question: What is the debugging method called where you talk your code through line by line to try and find errors?
Line by line checking
Rubber duck debugging
Quick questioning
Debug the debugger
Bonus question: which of these is NOT a programming language?
Ook!
LOLCODE
Chicken
TikTokie
How many times will the word "Apple" appear on the screen?
49
50
1
0
