Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Hi, I am Millicent, your personal bot.")
- users_name = input("What is your name?")
- print("Hello" + users_name)
- inputcommand = input("What do you want to do, add or subtract?")
- if inputcommand == "add":
- input1 = input("Number 1>")
- input2 = input("Number 2>")
- number1 = int(input1)
- number2 = int(input2)
- result = number1 + number2
- outputstring = str(result)
- print("The result is:" + outputstring)
- elif inputcommand == "subtract":
- input1 = input("Number 1>")
- input2 = input("Number 2>")
- number1 = int(input1)
- number2 = int(input2)
- result = number1 - number2
- outputstring = str(result)
- print("The result is:" + outputstring)
- else:
- print("Sorry, I don't understand your request")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement