If else statement is heavily used in most of the application built in the industry. Turning rules into conditions in python might be challenging but with the use of AND operator and OR operator will help in solving most of them.

 

If Else Statement

if condition:
print(“if condition is True”)
elif condition:
print(“elif condition is True”)
else :
print(“All conditions are False”)

AND Table

x y Result
True True True
True False False
False True False
False False False

OR Table

x y Result
True True True
True False True
False True True
False False False

NOT Table

x Result
True False
False True