LOOPS
VARIABLES & OPERATORS
CONDITIONALS & COMMAND LINE
FUNCTIONS
LISTS
100

this type of loop only stops if the condition is no longer satisfied

What is a while loop?

100

These data types are represented below:

3, 6.0 , 101.42, 5

What are integers and floats?

100

This code is missing this

if numRats == 30

   print("AHHHHHHHH")

What is a : ?

100

You use this keyword to define a function

What is def?

100

The number that represents the position of a value inside a list

What is the index?

200

This type of loop repeats the actions inside a set amount of times

What is a for loop?

200

When you use quotation marks around a word like this: "a word", you are defining a value of this data type

What are strings?

200

What is the missing Python conditional keyword:


if, _____, else

What is elif?

200

This Python built-in function allows you to get a user response from the command line

What is input()?

200

The Python keyword that returns the amount of values held in a list

What is len()?

300

This Python keyword allows you to stop a loop completely

What is break?

300

What is the value of the variable TREE after this code runs?


TREE = 1

TREE += 5

What is 6?

300

This command line command allows you to see what's in the current folder (in Windows)

What is dir?

300

This keyword, inside of a function, defines the output of the function but does not print

What is return?

300

A list of 5 values would have a last index of __

What is 4?

400

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()?

400

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 //?

400
This allows you to step back into the last folder you were in.

What is cd .. ?

400
We use _____ to pass data into a function

What are parameters?

400

This data type often referred to as a list of characters

What is string?

500

The following code produces this output


haha = 3

while (haha < 8)

  print("banana")

  haha += 2


What is "banana" "banana"?

500

The following returns this value (bonus if you give the data type)

"Ba" == "ba" or 4 == "4"

What is False (a boolean)?
500

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!"?

500

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?

500

The Python keyword that produces the Boolean output in the code below


fruit = "banana"

print("an" __ fruit)

#Output: True

What is in()?

M
e
n
u