Menu program doesn;t do selection

Thank you.

this is my code

def menu():
loop = 1
print(“Selections:”)
print(“”)
print(“1) ADDITION”)
print(“2) SUBTRACTION”)
print(“6) QUIT”)
print(“”)
return input(" Enter Selection: ")

def add(a, b):
print(a, " + ", b, " = ", a+b)

def sub(a, b):
print(a, " / ", b, " = ", a/b)

loop = 1
choice = 0
while loop == 1:
choice = menu()
if choice == 1:
add(input(“add this”),input(“to this”))
elif choice == 2:
sub(input(“subtract this”), input(“from this”))
elif choice == 6:
loop=0
print("Thank you ")

The input function returns a string, so if you type in 1 you’ll get the string '1', not the number 1.

Hi Matthew.

Thanks so much for taking the time. I’m going to look at it shortly.

-Pete Lazizzera

I changed it to int() and it worked.
Thanks!
-Pete