Python Level 3: Decisions

Chapter 3: The Computer Brain
Name:

Date:
Part 1: True or False?

Read the math statements. Circle True if it's right, or False if it's wrong.

5 > 2
True
False
10 == 10
True
False
3 > 100
True
False
Part 2: Indentation Police

Only one of these code blocks will run. The other will crash! Check the circle on the correct code.

if time == "night":
print("Sleep")
(No indentation)
if time == "night":
    print("Sleep")
(Indented)
Part 3: What Happens Next?

Look at the variables and the "If" statement. Write what the computer will print in the black screen.

robux = 50

if robux >= 100:
  print("Buy Item")
else:
  print("Too Expensive")
Output:
Part 4: The Password Gate

Fill in the blanks to make a security script. Set the secret password to "Open".

secret_word = ""

if secret_word == "Open" (Don't forget the colon!)
    print("Access ")
else:
    print("Access ")