Font size
Worksheets9.1.6 - Starter Quiz
Total questions: 12
Worksheet time: 8mins
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
