Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Two number calculator")
- print("Please enter two numbers to add, multiply, divide, or subtract")
- number1 == input("Number 1")
- number2 == input("Number 2")
- print("Would you like to add, multiply, divide, or subtract?")
- answer == input()
- if answer == "add" or "Add":
- print(number1 + number2)
- if answer == "multiply" or "Multiply":
- print(number1 * number2)
- if answer == "divide" or "Divide":
- print(number1 / number2)
- if answer == "subtract" or "Subtract":
- print(number1 - number2)
- else:
- print("Please try again")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement