Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Hi, I am Rosie, your personal bot.")
- command = input("How can I help? ")
- if command == "add":
- print("lets add some numbers")
- input1 = input("Number 1> ")
- input2 = input("Number 2> ")
- number1 = int(input1)
- number2 = int(input2)
- result = number1 + number2
- output = str(result)
- print(input1 + " plus " + input2 + " = " + output)
- elif command == "subtract":
- print("lets subtract some numbers")
- input3 = input("Number 3> ")
- input4 = input("Number 4> ")
- number3 = int(input3)
- number4 = int(input4)
- result = number3 - number4
- output = str(result)
- print(input3 + " minus " + input4 + " = " + output)
- else:
- print("Sorry, I don't understand")
- print("done")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement