this type of loop only stops if the condition is no longer satisfied
What is a while loop?
These data types are represented below:
3, 6.0 , 101.42, 5
What are integers and floats?
This code is missing this
if numRats == 30
print("AHHHHHHHH")
What is a : ?
You use this keyword to define a function
What is def?
The number that represents the position of a value inside a list
What is the index?
This type of loop repeats the actions inside a set amount of times
What is a for loop?
When you use quotation marks around a word like this: "a word", you are defining a value of this data type
What are strings?
What is the missing Python conditional keyword:
if, _____, else
What is elif?
This Python built-in function allows you to get a user response from the command line
What is input()?
The Python keyword that returns the amount of values held in a list
What is len()?
This Python keyword allows you to stop a loop completely
What is break?
What is the value of the variable TREE after this code runs?
TREE = 1
TREE += 5
What is 6?
This command line command allows you to see what's in the current folder (in Windows)
What is dir?
This keyword, inside of a function, defines the output of the function but does not print
What is return?
A list of 5 values would have a last index of __
What is 4?
You use this Python built-in function to list every integer between a lower bound and an upper bound. This is often used in a certain type of loop.
What is range()?
This operator, given two numbers, will tell you how many times the second number can fit in the first number, and return a whole number.
What is //?
What is cd .. ?
What are parameters?
This data type often referred to as a list of characters
What is string?
The following code produces this output
haha = 3
while (haha < 8)
print("banana")
haha += 2
What is "banana" "banana"?
The following returns this value (bonus if you give the data type)
"Ba" == "ba" or 4 == "4"
Watch Hue-anh. According to the following code, the output is this.
if (leftHandUp & rightHandUp):
print("Jump!")
elif(leftHandUp or rightHandUp):
print("one hand up but not both!")
What is "one hand up but not both!"?
If you run this code, the message in command line will be this
def greet(name):
print("Hello, " + username)
def main():
username = input("Give me a name")
greet(username)
What is NameError?
The Python keyword that produces the Boolean output in the code below
fruit = "banana"
print("an" __ fruit)
#Output: True
What is in()?