Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Hi, I am R2D2, your personal mathbot")
- command = input("How may I help you? ")
- if command == "add" or command == "plus":
- print("Let's add some numbers")
- number1 = int(input("number 1: "))
- number2 = int(input("number 2: "))
- result = number1 + number2
- print("Results:", number1, "+" ,number2, "=", result)
- elif command == "subtract" or command == "minus":
- print("Let's substract some numbers")
- number1 = int(input("number 1: "))
- number2 = int(input("number 2: "))
- result = number1 - number2
- print("Results:", number1, "minus", number2, "=", result)
- else:
- print("Sorry, this is the add math bot")
Add Comment
Please, Sign In to add comment