Lists
Dictionaries
Loops/Conditionals
Functions
What does it print?
100

Elements in a list should be surrounded by ________.

Square brackets

100

Dictionary elements have a key and a _____.

Value

100

This kind of loop should be used when you want to run a section of code “n times”.

For loop

100

True or false? A function always returns an output.

False

100

x = 32

y = 5

print(x%y)

2

200

The number of elements in a list is its ____.

Length

200

True or false? Dictionaries can be used for video games, recipes, schedules, and more.

True

200

True or false? I can use an elif statement before I use an if statement.

False.

200

If a function does not need parameters, you still must put ______ after the function name.

Parentheses.

200

for i in range(3):

    print(“This is loop number “ + str(i))

This is loop number 0

This is loop number 1

This is loop number 2

300

True or false? List names can start with a number.

False

300

True or false? Dictionary elements can have the same key.

False.

300

A ____ loop is when a loop runs forever and has no end. (we want to avoid this from happening!)

Infinite

300

This is what you put between the parentheses after a function name.

Parameters.

300

day = “Tuesday”

time = “morning”

if ( day == “Tuesday”):

    if (time ==”morning”):

        print(“Go to school”)

    elif (time == “night”):

        print(“Go to bed”)

elif (day == “Saturday”):

    print(“yay, no school today!)

Go to school

400

The first item in a list has the index ___.

0

400

The type of brackets used to create a dictionary are _____.

Curly brackets

400
what does this conditional do/print?


if (5%2 == 0):

    print("This is a modulo function")

Nothing! 5%2 is one, not zero

400

To create a function, use this three letter keyword.

"def"

400

listName = [1, 2, 3, 4, 5, 6]

print(listName[1])

2

500

To add an item to the end of a list, use <List_name>.______(value)

append

500

Dictionaries are different from lists because dictionaries don't have ______.

An index

500

While loops repeat as long as a certain _______ _______ is met.

Boolean condition

500

The part of a function where actions/commands are carried out is called _____.

The body.

500

ages = {“Emma”: 21, “Emily”: 20, “Molly”: 19, “Sophie”: 13}

print(ages[“Emily”])

20

M
e
n
u