print("True:",4==4)
print("True:",1!=0)
print("False:",7<=3)
print("True:",5<6)
print("False:",7>8)
print("True:",3>=3)
print('')

# Same as above, but now for other values other than int
print('True:',"as"=="as")
print("False",True == False)
print("False:",[2,3,1]!=[2,3,1])
print("True:",'af'<'bc')
print("False:",'ce'>'cf')
print("True:",[1,'b']>[1,'a'])
print('')
True: True
True: True
False: False
True: True
False: False
True: True

True: True
False False
False: False
True: True
False: False
True: True

number = 3          # value that will affect true or false statement
if number == 5:     # if part determines if the statement is true or false compared to another part of the program
    print("yes, 5 does equal 5")
else:               #else part only executes if the if part is false
    print("no, " + str(number) + " does not equal 5")
no, 3 does not equal 5
progress = 0
while progress < 100:
    print(str(progress) + "%")
    
    if progress == 50:
        print("Half way there")

    progress = progress + 10
print("100%" + " Complete")
    
0%
10%
20%
30%
40%
50%
Half way there
60%
70%
80%
90%
100% Complete
Age = int(input("How old are you?")); 
print(Age)
if (Age >= 18): 
    print("You are old enough to vote!")
    if(Age >= 65):
        print("You are a senior citizen!")
else: 
    print("You are too young to vote!")
13
You are too young to vote!

Homework/Challenges

def DecimalToBinary(num):
    strs = ""
    while num:
        # if (num & 1) = 1
        if (num & 1):
            strs += "1"
        # if (num & 1) = 0
        else:
            strs += "0"
        # right shift by 1
        num >>= 1
    return strs
 
# function to reverse the string
def reverse(strs):
    return strs[::-1]
 
# user inputs the number they would like to convert to binary
user_input = int(input("What number would you like to convert to binary?"))
print(f'{user_input} was chosen')
print(f'{user_input} converted to binary is {reverse(DecimalToBinary(user_input))}')
37 was chosen
37 converted to binary is 100101
def function(x, y, z):
    if(x > y):
        print("x is greater than y")
        if(x > z):
            print("x is greater than y and z")
        else: 
            print("x is only greater than y")
    else:
        print("x is less than y and z")
    
function(2, 3, 5)
x is less than y and z