>>> x = int(input("Please enter an integer: "))
Please enter an integer: 42
>>> if x < 0:
... x = 0
... print('Negative changed to zero')
... elif x == 0:
... print('Zero')
... elif x == 1:
... print('Single')
... else:
... print('More')
...
More
#best example of elif loop
a = 33
b = 33
if b > a:
print("b is greater than a")
elif a == b:
print("a and b are equal")
boolean1 = (1 != 1)
boolean2 = (2 + 2 == 5)
boolean3 = (1 == 1)
if (boolean1):
print("Boolean one is true")
elif (boolean2):
print("Boolean two is true")
else:
print("Boolean three may, or may not be true")
x = 20
if x == 20:
print("x = 20")
elif x == 30:
print ("x = 30")
else:
print("x is not 20 or 30")