Data Types and Operators
Functions
Conditionals
Loops
Collections
100

This character is what is used to create a string.

Single or Double quotes

100

This keyword is used to create a function.

def

100

An if statement inside of an if statement is also known as a...

Nested Conditional

100

Which loop is most infamous for creating infinite loops?

While Loop

100

List indexing starts at what number?

0

200

Name the four primitive data types in Python.

Int, Float, Boolean, String

200

True or False: The number of arguments passed in does not need to match the number of parameters.

False

200

True or False: Else statements cannot have an expression following them like if and elif statements.

True

200

The three parameters used in a for loop are...

Start, Stop, Step

200

Name the four built-in Python collections.

Lists, tuples, dictionaries, and sets

300

Describe what the % operator does.

Mod Operator: Returns the remainder

300

This statement/keyword is used to end the execution of a function call.

Return

300

True or False: A new if-else block is created every time a new if statement is initialized.

True

300

This keyword is used to end the execution of a loop early.

Break

300

Name at least 2 built-in functions that can be used to perform list operations.

Append, Copy, Clear, Count, Extend, Index, Insert, Pop, Remove, Reverse, Sort

400
Consider two variables. One of them contains an int and the other contains a float. If the int was divided by the float, what would the resulting data type be?

Float

400

What would print as a result of this function?

def sum(x, y):

    return x + y

sum(5, 3.5)

Nothing

400

Describe the difference between these logical operators: and, or

and means both expressions must be true, while or says at least one expression must be true

400

Consider the loop below. What would be printed out to the terminal?

for i in range(1, 3):

    for j in range(1, 4):

        print(i + j)

2, 3, 4, 3, 4, 5
400

Describe the difference between a list and a tuple.

Lists are mutable while tuples are immutable.

500

What does // do?

Integer Division: It will divide an int by a float and drop the decimal in the result.

500

Describe the difference between a parameter and an argument.

A parameter is the variable created in the function definition, while the argument is the value passed in to the parameter through the function call.

500

This data type is returned after the execution of every conditional.

Boolean

500

For Each Loops are used to loop over any _________ object.

iterable

500

Describe the three main characteristics of a dictionary.

Mutable, Unordered, Allow for Duplicates