This data type stores whole numbers like 3, 10, or -5.
What is an integer (int)?
The Python command used to show text on the screen.
What is print()?
A loop that repeats as long as a condition is true.
What is a while loop?
This keyword starts a conditional statement.
What is if?
print("Hello World!)
What is missing closing quotation mark? It should be print("Hello World!").
This is the correct way to assign the value 7 to a variable named age.
What is age = 7?
This command lets the user type information into the program.
What is input()?
What is often used as an iterative loop?
What is a for loop?
This keyword checks another condition when the first one is false.
What is elif?
number = input("Enter a number: ")
print(number + 5)
What is treating input as a string? Convert it: int(number) + 5.
The data type of "Hello" is this.
What is a string (str)?
x = 6
The output of print("Hi " + "there" + x).
Error, ha.
can only concatenate str (not "int") to str
What numbers would for i in range(5) produce?
What is 0, 1, 2, 3, 4?
What is the output of this code?
if 3 > 5 or 5 > 3 and 6 > 7 or 5 <= 5:
print("Yes")
else:
print("No")
What is Yes?
for i in range(3)
print(i)
What is missing colon after range(3)?
True or False values in Python are called this.
What is a boolean (bool)?
This is what happens when you try to add a string and an integer, like "age: " + 12.
What is a TypeError?
This keyword stops a loop early.
What is break statement?
These symbols are used to compare two values (name one for each team member).
What is ==, !=, <, >, <=, or >=?
if x = 10:
print("Ten")
What is using = instead of ==? It should be if x == 10:.
This is what Python calls numbers with decimals like 3.14.
What is a float?
What you need to do if you want to treat the result of input() as a number instead of a string.
What is convert it using int() or float()?
Type casting
What does this code print?
for i in range(2):
print("Python!" + i)
Error, ha
The keyword used to run code when all other conditions fail.
What is else?
while count < 5:
print(count)
What is forgetting to update count, causing an infinite loop? Must include count += 1.