Skip to content

Instantly share code, notes, and snippets.

@danggrianto
Created November 7, 2013 01:34
Show Gist options
  • Select an option

  • Save danggrianto/7347443 to your computer and use it in GitHub Desktop.

Select an option

Save danggrianto/7347443 to your computer and use it in GitHub Desktop.
x = input("Please input your first number : ")
y = input("Please input your second number : ")
while True:
print("Menu:")
print("1. Sum")
print("2. Subtract")
print("3. Multiply")
print("4. Divide")
print("5. Remainder of numbers")
print("6. Compare numbers")
print("7. Exit")
choice = input("Enter Input: ")
if choice == 1:
result = x + y
if choice == 2:
result = x - y
if choice == 3:
result = x * y
if choice == 4:
result = x / y
if choice == 5:
result = x % y
if choice == 6:
result = x, y
if choice == 7:
break
print('Result is : ')
print result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment