Font size
WorksheetsYear 9 - Term 1 Mega Quiz
Total questions: 85
Worksheet time: 45mins
A loop that keeps repeating steps until something happens is called a (a) controlled loop.
import random
letters = ["a","b","c","d","e","f"]
chosenLetter = letters(random.randint(0,5))
What is the name of the variable in the code above
chosenLetter
letters
random
randint
what peice of syntax always comes at the end of a line declaring a loop in python?
?
*
:
!
>
count-controlled iteration can also be referred to as
(a) loops
(a) counter in range(5):
print(counter)
fill in the blank to make the above code print the numbers 0-4
what is python?
a game
a coding language
a program
a browser
machine code
newName = input("Enter a name")
characterNames = ["Ada", "Alan", "Charles", "Katherine"]
characterNames.append(newName)
What is the name of the list in this code?
newName
characterNames
input()
append()
=
characterNames = ["Ada", "Alan", "Charles", "Katherine"]
characterNames. (a) ("Ada")
What word would I add in the blanks to take Ada out of the list called characterNames
Create a program that it outputs "Hello World":
(a) (b) (c) (d)
userAge = (a) ("How old are you?")
What is printed by the following lines of code?
eggs
bread
2
sugar
How many items can a list contain? Tick all that apply.
0
1
2
3
10
What is the maximum amount of items you can store in a variable?
0
1
2
3
What would be the output of this code?
laurions = ["Altius", "Citius", "Fortius", "Magnus"]
print(laurions)
["Altius", "Citius", "Fortius", "Magnus"]
Altius , Citius, Fortius , Magnus
laurions
"Altius", "Citius", "Fortius", "Magnus"
Error
What would be the output of this code?
laurions = ["Altius", "Citius", "Fortius", "Magnus"]
print(laurions[2])
(a)
laurions = ["Altius", "Citius", "Fortius", "Magnus"]
chosenLaurion = laurions[1]
What is the variable in this code?
(a)
What is the name for the data structure in python which can hold more than one item?
(a)
What is the output of the code below?
laurions = ["Altius", "Citius", "Fortius", "Magnus"]
laurions.clear()
laurions.append("magnus")
laurions.append("citius")
print(laurions[1])
(a)
firstNames = ["Ada", "Alan", "Charles"]
surnames = ["Lovelace", "Turing", "Babbage"]
subject = "Computer Science"
What is the name of the variable in the code above?
(a)
import random
randomNumber = random.randint(0,4)
letters = ["a","b","c","d","e"]
print(letters[randomNumber])
What is the name of the variable in the code above?
(a)
In an array, what is the first numbered position in which data can be stored?
Position 0
Position 1
Which of these in an advantage of a database?
Select all that apply
It’s easy to add to or amend existing records.
They're written in python.
Multiple people can access a database at the same time.
Security can be better than paper files by using a password.
They can be hacked.
I have created a database of students. 'name' is likely to be what?
A table
A field
A record
A DBMS
I have created a database of pets who are up for adoption. Snowy is a white labrador, all of his data can be grouped together. This would be classed as a ... ?
A table
A field
A record
A DBMS
the name of a category in a database, such as 'name', 'age', 'gender' is a (a)
DBMS stands for what?
Database Management System
Double Base Mega Slam
Database Money System
Database Media Storage
Which of these is a DISADVANTAGE of a database?
It can store more than one piece of data.
It can be hacked.
It relies on paper.
It cannot be moved from place to place.
Tables are ususally named starting with which three letter abbreviation?
(a)
Which of these is true of a primary key?
It must be unique
It must start with the letter a.
It must start with the number 0.
It must be only 1 character long.
A database can hold more than 1 Million pieces of data?
True
False
Databases make it easier to find and use data from big data sets.
False
True
In a database, each record will usually have data in multiple fields?
False
True
There will always be more records than fields in a database.
True
False
subjects = ["Computing", "Drama", "English", "Maths", "Science", "Spanish"]
What is subjects [2]
Computing
English
Science
Drama
Index Error
What would be the output of the code below:
laurions = ["Altius", "Citius", "Fortius", "Magnus"]
print(laurions[3] + " beat " + laurions[2])
Error
Fortius beat Citius
Magnus beat Fortius
Magnus beat Citius
Fortius beat Magnus
Which of these is an appropriate name for a list containing:
Apples, Oranges, Pears, Bananas
Fruit
fruit
x
list1
What is python
Programming Language
Browser
Coding Method
Computer Game
name = input("What is your name?"
print("Hello" + name")
If I inputted Elsa into the program above, what would the output be?
Hello Elsa
Elsa
HelloElsa
Error
Let it go!
A loop that does an instruction for a certain number of times is known as:
a (a) controlled loop, or a 'for loop'.
playerName = (a) ("Enter your name")
print("Welcome to the game " + playerName)
The below above allows a player to enter their name and then greets them. What is the missing word?
for counter in range(10):
print(counter)
What will be the final line output by this program?
(Type your answer as a number)
(a)
laurions = ["Altius", "Citius", "Fortius"]
laurions. (a) ("Magnus")
fill in the blanks to make it so that the code ADDS Magnus to the list of laurions.
code:
___ counter in range(2):
print(counter)
What word is missing from the code above. The program outputs the numbers 0 and 1.
and
for
while
if
nor
laurions = ["Altius", "Citius", "Fortius", "Magnus"]
playerName = input("Enter your name")
chosenLaurion = input("Who would you like to choose as your starter Laurion")
How many variables are there in the above code?
0
1
2
3
4
What does the flowchart to the left represent?
Selection
Count Controlled Iteration
Condition Controlled Iteration
Hacking
Decomposition
spice_girls = ["Emma", "Geri", "Mel B", "Mel C", "Victoria"]
which line of code would output the word Geri if added to the program above.
print(spice_girls[1])
print(spicegirls[0])
print(Spice_girls[1])
pint(spice_girls[1])
Count-controlled iteration in python uses:
for loops
while loops
if statements
print statements
condition controlled iteration in python uses:
for loops
while loops
if statements
print statements
which can hold multiple pieces of data?
a variable
a list
dinner_options = ["pizza", "pasta", "stir-fry", "curry", "fish and chips", "fajitas"]
import random
randomNumber = random.randint(0,3)
print(dinner_options[randonNumber]
Kieran is indecisive and has created a python program to help him choose what to have for dinner. There is an error with his program. Which options will the program never choose?
pizza
stir-fry
curry
fish and chips
fajitas
Create a statement which adds "Citius" to a list called laurions:
(a) (b) (c) (d) "Citius" (e)
Who is that
Santa
Elf
A Snowflake
Rudolph the Red-Nosed Reindeer
A normal Reindeer
2. In the song The 12 days of Christmas, what gift was given on the fourth day?
French Hens
Golden Rings
Calling Birds
4. How do you say "Merry Christmas" in Spanish?
Sheng Dan Kuai Le
Feliz Navidad
Maligayang Pasko
On which continent is the Sahara desert?
Africa
Asia
North Africa
South Africa
Which planet is the smallest?
Mars
Saturn
Mercury
Venus
How many zeroes in ten million?
5
6
7
8
John, Paul, George and Ringo were part of which band?
The Rolling Stones
Bee Gees
The Monkees
The Beatles
Select the animal that can't jump:
Kangaroo
Elephant
Dog
Cat
What is the sweet food made by bees?
Wax
Pollen
Nectar
Honey
What’s the name of the toy cowboy in Toy Story?
Woody
Buzz
Andy
Sid
What is the name of the fairy in Peter Pan?
Wendy
Tinkerbell
Lily
Jane
What is the largest ocean on Earth?
The Atlantic.
The Artic.
The Pacific.
The Indian.
Who is the premier league footballer with the most goals?
Alan Shearer
Teddy Sheringham
Sergio Aguero
Thierry Henry
What Is The Hottest Colour Of A Fire?
Light Blue
Red
Green
Orange
Which Country Has Cities Such As Sydney, Canberra, Perth And Melbourne?
New Zealand
Australia
Lebanon
Oman
What Is The Gestation Period Of A Rhinoceros On Average?
16 months
8 months
21 months
3.5 years
What Is 12 x 12?
144
156
189
211
Which Country Has The Capital Lima?
Peru
Venezuela
Morocco
Australia
What sport is this?
mountain biking
skiing
surfing
sky diving
Who is this?
Blue Girl
Elsa
Frozen
Anna
What is lava?
hot rock
liquid fire
cold fire
hot metal
(a) are involved with everything we do online. From social networking to the BBC website, (b) are crucial tools used to store large amounts of (c) in an (d) way.
