Share your repls and programming experiences

← Back to all posts
CaclutLATER
Sureshbabubabu2 (0)

print ("Menu")
print ("Press 1 or + for addtion")
print("Press 2 or - for subtraction")
print("Press 3 or * for multiplcation")
print("Press 4 or / for division")
print("Press 5 or % for modulus")
op = input("Enter the operation: ")

N1 = int(input ("Enter the first number: "))
N2 = int(input ("Enter the second number: "))
if op == "1" or op == "+":
print("answer = ",N1 + N2)
elif op == "2" or op == "-" :
print("answer = ",N1 - N2)
elif op == "3" or op == "" :
print("answer = ",N1
N2)
elif op == "4" or op == "/" :
print("answer = ",N1 / N2)
elif op == "5" or op == "%" :
print("answer = " ,N1 % N2)