-
-
Save danggrianto/7346231 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| x = input("Please input your first number : ") | |
| y = input("Please input your second number : ") | |
| 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= '' | |
| while choice== '': | |
| choice = input() | |
| #this use integer instead of string | |
| if choice == 1: | |
| # x and y here you put as string literal so it willl be read as string | |
| # Sum=("x+y") | |
| print(x + y) | |
| elif choice== '2': | |
| Subtract=("x-y") | |
| elif choice== '3': | |
| Multuply=("x*y") | |
| elif choice== '4': | |
| Divide=("x/y") | |
| elif choice== '5': | |
| Remainder=("x%y") | |
| elif choice== '6': | |
| Compare=("x,y") | |
| elif choice== '7': | |
| print(exit) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment