Lesson 5: The big IF

posted Nov 14, 2019, 7:58 AM by Attila Lengyel
a = int(input("give me a number:"))

if a < 10:
print("a is smaller than 10")
elif a == 10:
print("a equals to 10")
else:
print("a is greater than 10")

print("the task is done")

print(10%2)
print(9%2)

if a % 2 == 0:
print("a is an even number")
else:
print("a is an odd number")

if a % 2 == 0 and a < 10:
print("a is a even number smaller than 10 ")
Comments