Advertisement
Guest User

Sums code

a guest
Feb 18th, 2020
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. print("Howdy, my name's Evan.")
  2. user_name = input("What's yours? ")
  3. print("Hi " + user_name + ", " + "let's do some sums!")
  4. print("We'll start with dividing.")
  5. input1 = input("Tell me a number... ")
  6. input2 = input("Great. Now give me another one... ")
  7. print("Thanks. Now the dividing.")
  8. number1 = int(input1)
  9. number2 = int(input2)
  10. result = number1 / number2
  11. output = str(result)
  12. print(input1 + " / " + input2 + " = " + output)
  13. print("I feel in the mood to multiply now!")
  14. input3 = input("Let's have another number... ")
  15. input4 = input("Perfect. And one more... ")
  16. print("Awesome. Let's multiply!")
  17. number3 = int(input3)
  18. number4 = int(input4)
  19. result = number3 * number4
  20. output = str(result)
  21. print(input3 + " * " + input4 + " = " + output)
  22. print("Whoop whoop, I've only gone and done it!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement