I am making a simple text menu in Python and every time it gets to the while loop for the menu it just turns infinite.. I am not sure what's going on, I feel as if this should work correctly.
# Menu system!
def menu():
print "blahblah options"
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 == 3:
mul(input("Multiply this: "),input("by this: "))
elif choice == 4:
div(input("Divide this: "),input("by this: "))
elif choice == 5:
loop = 0
What is happening here that is causing it to loop through the print statement at the top endlessly?