Advertisement
Guest User

Untitled

a guest
Dec 14th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. print("Hi, I am Marvin, your personal bot.")
  2. print("Let's get started!!")
  3. user_name = input("What's your name!? ")
  4. print(user_name)
  5. print("Hello " + user_name + ". Welcome!!")
  6. command = input("How can I help? ")
  7. if command == "add":
  8. print("Let's add some numbers!!")
  9. input1 = input("Number 1> ")
  10. input2 = input("Number 2> ")
  11. input3 = input("Number 3> ")
  12. result = int(input1) + int(input2) + int(input3)
  13. output = str(result)
  14. print(input1 + " + " + input2 + " + " + input3 + " = " + output)
  15. elif command == "subtract":
  16. print("Let's subtract some numbers")
  17. input1 = input("Number 1> ")
  18. input2 = input("Number 2> ")
  19. number1 = int(input1)
  20. number2 = int(input2)
  21. result = number1 - number2
  22. output = str(result)
  23. print(input1 + " - " + input2 + " = " + output)
  24. else:
  25. print("sorry I dont understand")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement