Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Hi, I am Marvin, your personal bot.")
- command = input("How can I help? ")
- if command == "add":
- print("lets add some numbers")
- input1 = int(input("Number 1> "))
- input2 = int(input("Number 2> "))
- result = input1 + input2
- print(input1," + " ,input2," = " ,result)
- elif command == "subtract":
- print("lets subtract some numbers")
- input1 = int(input("Number 1> "))
- input2 = int(input("Number 2> "))
- result = input1 - input2
- print(input1," - " ,input2," = " ,result)
- else:
- print("sorry I dont understand")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement