""" Lecture 3-1 """
x = 9
print((x >= 0) and (x < 10))

#

day = "Monday"
print((day == "Saturday") or (day == "Sunday"))

#

x = 5
print(not (x == 0))

###

x = 50
print("hello")
if x < 10:
    print("wahoo!")
print("goodbye")

###

print("hello")
if x < 10:
    print("wahoo!")
else:
    print("ruh roh")
print("goodbye")

###

x = 5
if x > 10:
    print("Up high!")
else:
    print("Down low!")

###

print("hello")
if x < 10:
    print("wahoo!")
elif x <= 99:
    print("meh")
else:
    print("ruh roh")
print("goodbye")

###

grade = 32
if grade >= 90:
    print("A")
elif grade >= 80:
    print("B")
elif grade >= 70:
    print("C")
elif grade >= 60:
    print("D")
else:
    print("R")

###

age = 29
license = False
if age >= 26:
    if license == True:
        print("Rental Approved")
    else:
        print("Rental Denied")
else:
    print("Rental Denied")

#

if age >= 26 and license == True:
    print("Rental Approved")
else:
    print("Rental Denied")

###

def findAverage(total, n):
   if n <= 0:
       return "Cannot compute the average"
   return total / n

###

"""
x = @     # @ is not a valid token
4 + 5 = x # the parser stops because it doesn't follow the rules

    x = 4   # IndentationError: whitespace has meaning
print(4 + 5 # Incomplete Error: always close parentheses/quotes
"""

###

"""
print(Hello) # NameError: used a missing variable

print("2" + 3) # TypeError: illegal operation on types

x = 5 / 0 # ZeroDivisionError: can't divide by zero
"""

###

print("2 + 2 = ", 5) # no error message, but wrong!


def double(x):
    return x + 2 # adding instead of multiplying

assert(double(3) == 6) # 6 is the intended result
