Lesson 3: Control flow using if... elif... else
Post date: Oct 20, 2017 2:56:15 PM
a = input("Give me a number:")
b = input("Give me another:")
print("A=", a, "and B=", b)
if int(a) > int(b):
print("A is greater than B")
elif int(a) == int(b):
print("A is equal to B")
else:
print("B is greater than A")
sign = input("Give me a symbol:")
if sign == "+":
print(a, "plus", b, "is", int(a) + int(b))
else:
print("I don't know this symbol", sign)
print("The program is exiting... bye")