Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Hi, I am Jenny, your personal bot.")
- command = input("How can I help? ")
- if command == "add":
- print("Let's add some numbers!")
- users_name = input("What is your name? ")
- print("Welcome to Math world, " + users_name)
- print("Let's add some numbers.")
- input1 = input("Number1- ")
- input2 = input("Number2- ")
- input3 = input("Number3- ")
- number1 = int(input1)
- number2 = int(input2)
- number3 = int(input3)
- result = number1 + number2 + number3
- output = str(result)
- print(input1 + "+" + input2 + "+" + input3 + "=" + output)
- elif command == "subtract":
- print("Let's subtract some numbers.")
- input1 = input("Number1- ")
- input2 = input("Number2- ")
- number1 = int(input1)
- number2 = int(input2)
- result = number1 - number2
- output = str(result)
- print(input1 + "-" + input2 + "=" + output)
- else:
- print("I don't understand.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement