Narrated by Tilda,
self-taught developer
# Basic comparisons
if a < b:
print("a is less than b")
if a > b:
print("a is greater than b")
print("Done")
(1815 - 1864)
Credited for Boolean Algebra
# If statements
if a < b:
print("a is less than b")
# If statements
if a < b:
print("a is less than b")
elif a > b:
print("a is greater than b")
else:
print("a is equal to be")
# Assignment operator uses one equals
# You are TELLING it the value
a = 5
# Comparison operator uses two equals
# You are ASKING if it is the value
if a == 5:
print("a is five")
# Boolean values store True or False
is_rainy = True
# If statements can operate on these
if is_rainy:
print("Open umbrella")
if not is_rainy:
print("Water garden")