Skip to content

Instantly share code, notes, and snippets.

@Jakhongir91
Created January 13, 2018 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jakhongir91/44d2574742243872834b3cdbc1612f3e to your computer and use it in GitHub Desktop.
Save Jakhongir91/44d2574742243872834b3cdbc1612f3e to your computer and use it in GitHub Desktop.
while True:
print("Options:")
print("Enter 'add' to add two numbers")
print("Enter 'subtract' to subtract two numbers")
print("Enter 'multiply' to multiply two numbers")
print("Enter 'divide' to divide two numbers")
print("Enter 'quit' to end the program")
user_input = input(": ")
if user_input == "quit":
break
elif user_input == "add":
...
elif user_input == "subtract":
...
elif user_input == "multiply":
...
elif user_input == "divide":
...
else:
print("Unknown input")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment