The function used to add an item to the end of a list.
What is append()?
The keyword used to declare a function.
What is def?
The length of the following string.
"16483"
What is 5?
The two keywords associated with conditionals.
What are if/else OR and/or?
It is this person's birthday today (they are in this call).
Who is Edwin?
A given list can only hold one data type.
What is False?
The way that a function is differentiated from the code around it (hint: it is the same way loops and conditionals are differentiated).
What are indents?
The smallest division of a string.
What is a character?
The type of variable associated with conditionals.
What are booleans?
The function used to specify a consecutive set of numbers.
What is range()?
The correct line of code to remove the the item "beans" from the list "grocery."
What is the following line?
grocery.remove("beans")
The name for when a function calls on itself.
What is a recursive function?
The concept used to convert variables to different data types, often used when taking user input?
What is type casting?
The keyword used between if and else statements.
What is elif?
The language that is based entirely on dictionaries.
The error that is thrown by running the following code.
stuff = [0, "yea", True, 5.6, [1, 2]]
print(stuff[5])
What is IndexError?
The name for the bolded concept below.
def func(name: str):
What is type declaration?
The name of the command in use in the following code.
stuff = "abcdef"
print(stuff[3:])
What is string splicing?
Write (say) code to determine if we should go to school, given the two booleans "vacation" and "blizzard"
What is go to school only if vacation is false and blizzard is false?
What is False?
The output of the following code.
stuff = [0, True, 53.24, 1432, ["fdsa", 435], "afdshaui"]
print(stuff[3][4])
What is an error?
The output of the following code.
def func_1(str_1):
print(str_1)
def func_2(str_1):
print(str_1[2:])
func_2("153")
What is 3?
The output of the following code:
str1 = "5"
str2 = "2995"
num = (int(str1)+int(str2))/int(str1)/int(str1)/int(str1)/4/6
if(num):
print("Yay!")
else:
print("Nay)
What is "Yay!"?
The output of the following code.
var = (True and False) or (False or False) or (True and True)
if var:
print(0)
else:
print(1)
What is 0?
The name of the loop used to loop through a list.
What is a for-each loop?