Comments / Data Types
Random Numbers
Operators / Flow Charts
Loops
Conditionals
100

The purpose of a comment in Python code.

What is to explain or provide notes about the code?

100

The first thing in a program that uses random numbers.

What is import random?

100

The / operator does this.

What is division?

100

The purpose of a loop.

What is to repeat code?

100

The definition of a conditional.

What is an if-statement?

200

The symbol used to start a comment in Python

What is #?

200

The range of the following number:

num = random.randint(5,10)

What is 5 to 10?

200

Solve:

4 + 2 * 10

24

200

The missing word:

for i in _______(5):

   print("Hello")

What is range?

200

The three types of conditionals.

If, Elif, Else

300

The problem with this code:

num = 2

print(“You have ” + num + “potatoes!”)

What is a TypeError?

300

The problem with this code:

import random

num = randint.random(2,15)

import random

num = random.randint(2,15)

300

The problem with this code:

numA = 15

numB = 2

print(numA x numB)

numA = 15

numB = 2

print(numA * numB)

300

The problem with this code

for i in range(4)

   print("Fish")

for i in range(4):

   print("Fish")

300

The problem with this code:

if num == 3:
   print("Duck")

elif:

   print("Goose")

if num == 3:
   print("Duck")

else:

   print("Goose")

400

The line that will not run:

# This is line one

print('THIS IS LINE TWO')

print('This is line three')


What is line one?

400

The problem with this code:

import random

num = random.randint(18,9)

What is invalid range?

400

The number of arrow that come out of a conditional in a flow chart.

What is two?
400

How many times will the word "Blueberry" print?

for i in range(3):

   for j in range(4):

      print("Blueberry")

What is 12?

400

The number of elifs per conditional.

What is infinite?

500

Fix this code:

age = input("Enter age: ")

print("In five years you will be " + age + 5)

age = input("Enter age: ")

print("In five years you will be " + str(int(age) + 5))

500

Fix this code:

import random

num = int(input("Pick a number less than 10"))

newNum = random.randint(12, num)

import random

num = int(input("Pick a number less than 10"))

newNum = random.randint(num, 12)

500

Fix this code:

numA = 28

numB = 30

#find the average

avg = (numA + numB) \ 2

numA = 28

numB = 30

#find the average

avg = (numA + numB) / 2

500

The purpose of the variable 'i'?

What is counting the number of times the loop has run?

500

Fix this code:

if num => 8:

   print("Bigger than seven")

elif num == 9:

   print("It's a nine")

if num >= 8:

   print("Bigger than seven")

elif num == 9:

   print("It's a nine")

M
e
n
u