Data Types
Lists and more data
Loops
Conditionals
Logic
100

42 is an example of.....

An integer

100

colors = ["red", "blue", "green"]

What is the index of "red"? (in python)

0

100

A ____ loop is used when something repeats a fixed amount of time.

For loop

100

This keyword starts a conditional in most programming languages.

If

100

x = 7
if x > 5 and x < 10:
    print("Yes")
else:
    print("No") 

What will be printed?

Yes 

200

True is an example of...

A boolean

200

The variable age is used to represent a person’s age, in years. What is the most appropriate data type for age? 

Integer

200

A _____ loop is used when something repeats until a condition is met.

While

200

This part of the conditional runs when the condition is false

else

200

What does modulus do?

Checks the remainder of a number

300

"How old are you?" is an example of....

A string

300
alist = [1,2,3]

blist = [4,5,6]

print(alist + blist)

What will the code print?

1,2,3,4,5,6

300

for i in range(5):

     print("hello")

What is printed?

hello five times

300

You can enter a game if you are 13 or older. What conditional represents this?

if age >= 13

300

if x > 10:

print("Big")

What is the error in this code?

Missing indentation 

400

5.08 is an example of...

A float

400

The variable isOpen is used to indicate whether or not a store is currently open. What data type best represents isOpen?

Boolean

400

numbers = [1,2,3,4]

print(len(numbers))

What is printed?

4

400

A discount applies if a customer is a member OR spends more than $50. Write the condition.

if is_member or total > 50

400

A student passes if they score 65 or higher AND have less than 10 absences. Write the condition.

if score >= 65 and absences < 10

500

age = int(input("enter your age:"))
What is the purpose of "int" in the code here?

"int" is used for data casting - changes the users input from a string to an integer

500

animals = ["dog", "cat", "bird"]

animals.pop(2)

print(animals)

What is printed?

[dog, cat]

500

sky = blue

While True:

     print("the sky is blue") 

Whats the problem with this code?

Infinite loop, no end condition

500

if x > 5:
    print("A")
elif x > 3:
    print("B") 

Why might "B" never print for some values?

values greater than 5 already satisfy the first condition

500

if x = 5:

     print("Hi")

What is the error in this code?

= instead of ==

M
e
n
u