wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

9.1.6 - Starter Quiz

Total questions: 12

Worksheet time: 8mins

Name
Class
Date
1.

A loop that does an instruction for a certain number of times is known as:

a (a)   controlled loop, or a 'for loop'.

2.

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?

3.

for counter in range(10):

print(counter)

What will be the final line output by this program?

(Type your answer as a number)

(a)  

4.

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.

5.

code:

___ counter in range(2):

print(counter)

What word is missing from the code above. The program outputs the numbers 0 and 1.

a)

and

b)

for

c)

while

d)

if

e)

nor

6.

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?

a)

0

b)

1

c)

2

d)

3

e)

4

7.

What does the flowchart to the left represent?

a)

Selection

b)

Count Controlled Iteration

c)

Condition Controlled Iteration

d)

Hacking

e)

Decomposition

8.

spice_girls = ["Emma", "Geri", "Mel B", "Mel C", "Victoria"]

which line of code would output the word Geri if added to the program above.

a)

print(spice_girls[1])

b)

print(spicegirls[0])

c)

print(Spice_girls[1])

d)

pint(spice_girls[1])

9.

Count-controlled iteration in python uses:

a)

for loops

b)

while loops

c)

if statements

d)

print statements

10.

condition controlled iteration in python uses:

a)

for loops

b)

while loops

c)

if statements

d)

print statements

11.

which can hold multiple pieces of data?

a)

a variable

b)

a list

12.

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?

a)

pizza

b)

stir-fry

c)

curry

d)

fish and chips

e)

fajitas