Advertisement
Guest User

Untitled

a guest
Oct 16th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.71 KB | None | 0 0
  1. print("Hi, I am Marvin, your personal bot.")
  2. users_name = input("What is your name? ")
  3. print("Welcome " + users_name+"!")
  4. print("Let's add two numbers.")
  5. input1 = input("Number 1: ")
  6. input2 = input("Number 2: ")
  7. number1 = int(input1)
  8. number2 = int(input2)
  9. result1 = number1 + number2
  10. output1 = str(result1)
  11. print(" ")
  12. print("So.... " + input1 + " + " + input2 + " = " + output1)
  13. print(" ")
  14. print("That's great!")
  15. print(" ")
  16. input3 = input("Let's add a 3rd number: ")
  17. number3 = int(input3)
  18. result2 = number1 + number2 + number3
  19. output2 = str(result2)
  20. print(" ")
  21.  
  22. print("And the sum of " + input1 + " + " + input2+ " + " + input3 + " is " + output2)
  23. print(" ")
  24. print("Woo Hoo for You!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement