# If/ Else conditions are used to decide to do something based on something being true or false

x = 10
y = 10

# Comparison Operators (==, !=, >, <, >=, <=) - Used to compare values

# Simple if
if x > y:
    print(f'{x} is greater than {y}')

# IF ELSE
if x > y:
    print(f'{x} is greater than {y}')
else:
    print(f'{y} is greater than {x}')

# ELIF
if x > y:
    print(f'{x} is greater than {y}')
elif x == y:
    print(f'{x} is equal to {y}')
else:
    print(f'{y} is greater than {x}')

# nested if
if x > 2:
    if x <= 10:
        print(f'{x} is greater than 2 but less than or equal to 10')

# Logical operators (and, or, not) - Used to combine conditional statements
# and
if x >= 2 and x <= 10:
    print(f'{x} is greater than 2 but less than or equal to 10')

# or
if x >= 2 or x <= 10:
    print(f'{x} is greater than 2 but less than or equal to 10')

# not
if not(x == y):
    print(f'{x} is not equal to {y}')


# Membership Operators (not, not in) - Membership operators are used to test if a sequence is presented in an object

numbers = [1, 2, 3, 4, 5]
z = 3
w = 7
q = 3

# in
if z in numbers:
    print(z in numbers)

# NOT IN
if w not in numbers:
    print(w not in numbers)

# Identity Operators (is, is not) - Compare the objects, not if they are equal, but if they are actually the same object, with the same memory location:
if z is q:
    print(z is q)

if z is not w:
    print(z is not w)
