Function
Lists/Strings/Slicing
Loop
Dictionary
Boolean Logic
100

The output of the following code: 

print('lions', 'tigers', 'bears')

What is:


lions tigers bears
100

Syntax used to create a list

What is 

list_name = []

100

This loop runs a block of code a specific number of times

What is a for loop?

100

Syntax used to create an empty dictionary

myDictionary = {}

100

This operator returns True only if both conditions are true.

What is "and"?

200

This key word is used to define a function in Python

What is def

200

Operator used to concatenate two strings

What is "+"?

200

This loop continues as long as a condition is true.

What is a while loop

200

Method used to get dictionary values

What is the values method?

200

This operator returns True if at least one condition is true.

What is "or"?

300

The default value of name in the function definition

def greet(name = Guest"):

    print(f'hello {name}')


What is "Guest"?

300

Index used to access the first element of a list

What is 0

300
This keyword exists a loop entirely

What is break?

300

Method used to get key, value pairs from a dictionary

What is the items() method

300

This unary operator negates the truth of its operand

What is "not"?

400

This type of argument is specified by name during a function call.

What is a keyword argument?

400

This method adds an item to the end of a list.

What is append()?

400

The error that occurs when a loop condition is always true.

What is an infinite loop?

400

Error that occurs when accessing a key that doesn't exist?

What is "KeyError"?

400

The boolean value that an empty list, empty dictionary, and numeric value of 0 evaluates to according to the rules of truthiness

What is False?

500

Code snippet to define a function with two parameters that prints two arguments

What is:

def newfunction(param1, param2):

    print(param1,param2)

500

Create a slice to access the 3rd through 5 elements of a list

my_list[2:6]

500

A for loop to calculate the sum of scores. in the following list:

scores = [5,8,15]

sum = 0

for score in scores:

sum+=score

500

Code snippet to create a dictionary with two keys and two values

myDictionary = {'key1':1,'key2'; :2}

500

If statement to determine if a number is greater than four and less that eight

What is 

if num >4 and num<8

or

if 4< number < 8?

M
e
n
u