This character is what is used to create a string.
Single or Double quotes
This keyword is used to create a function.
def
An if statement inside of an if statement is also known as a...
Nested Conditional
Which loop is most infamous for creating infinite loops?
While Loop
List indexing starts at what number?
0
Name the four primitive data types in Python.
Int, Float, Boolean, String
True or False: The number of arguments passed in does not need to match the number of parameters.
False
True or False: Else statements cannot have an expression following them like if and elif statements.
True
The three parameters used in a for loop are...
Start, Stop, Step
Name the four built-in Python collections.
Lists, tuples, dictionaries, and sets
Describe what the % operator does.
Mod Operator: Returns the remainder
This statement/keyword is used to end the execution of a function call.
Return
True or False: A new if-else block is created every time a new if statement is initialized.
True
This keyword is used to end the execution of a loop early.
Break
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
Float
What would print as a result of this function?
def sum(x, y):
return x + y
sum(5, 3.5)
Nothing
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
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)
Describe the difference between a list and a tuple.
Lists are mutable while tuples are immutable.
What does // do?
Integer Division: It will divide an int by a float and drop the decimal in the result.
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.
This data type is returned after the execution of every conditional.
Boolean
For Each Loops are used to loop over any _________ object.
iterable
Describe the three main characteristics of a dictionary.
Mutable, Unordered, Allow for Duplicates