wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

9.1.5 - Starter Quiz

Total questions: 14

Worksheet time: 10mins

Name
Class
Date
1.

A loop that keeps repeating steps until something happens is called a (a)   controlled loop.

2.

What is the variable in the code below:

name = input("Enter your name")

a)

input()

b)

name

c)

=

d)

"

3.

What is the name for repeating / loops commands in a program in python?

a)

iteration

b)

decomposition

c)

selection

d)

abstraction

4.

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

a)

chosenLetter

b)

letters

c)

random

d)

randint

5.

import random

letters = ["a","b","c","d","e","f"]

chosenLetter = letters(random.randint(0,2))

tick all possible outputs of the program above?

a)

a

b)

b

c)

c

d)

d

e)

e

6.

what peice of syntax always comes at the end of a line declaring a loop in python?

a)

?

b)

*

c)

:

d)

!

e)

>

7.

count-controlled iteration can also be referred to as

(a)   loops

8.

(a)   counter in range(5):

print(counter)

fill in the blank to make the above code print the numbers 0-4

9.

How many pieces of data can be stored in a variable?

a)

1

b)

2

c)

3

d)

4

10.

what is python?

a)

a game

b)

a coding language

c)

a program

d)

a browser

e)

machine code

11.

newName = input("Enter a name")

characterNames = ["Ada", "Alan", "Charles", "Katherine"]

characterNames.append(newName)

What is the name of the variable in this code?

a)

newName

b)

characterNames

c)

input()

d)

append()

e)

=

12.

newName = input("Enter a name")

characterNames = ["Ada", "Alan", "Charles", "Katherine"]

characterNames.append(newName)

What is the name of the list in this code?

a)

newName

b)

characterNames

c)

input()

d)

append()

e)

=

13.

newName = input("Enter a name")

characterNames = ["Ada", "Alan", "Charles", "Katherine"]

characterNames.append(newName)

What are the names of the functions in this code?

a)

newName

b)

characterNames

c)

input()

d)

append()

e)

=

14.

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