Advertisement
Guest User

casting

a guest
Apr 5th, 2020
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.91 KB | None | 0 0
  1. print("Hello, there!")
  2. print("Let me introduce myself:")
  3. print("I am Martina, a silly bot, at your service")
  4. print("Welcome!")
  5.  
  6. print("To begin, tell me:")
  7. user_name = input("What is your name?")
  8. print("Hi, " + user_name + ", nice to meet you!")
  9.  
  10. print("Now, let's do some math!")
  11. input1 = input("Type your 1st number - ")
  12. input2 = input("Type 2nd number - ")
  13. input3 = input("Type 3rd number - ")
  14. number1 = int(input1)
  15. number2 = int(input2)
  16. number3 = int(input3)
  17. result = number1 + number2 + number3
  18. output = str(result)
  19. print("Let's see what we've got?")
  20. print(input1 + " + " + input2 + " + " + input3 + " = " + output)
  21.  
  22. print("Let's try multiplying with decimal numbers:")
  23. input3 = input("Choose decimal 1 - ")
  24. input4 = input("Choose decimal 2 - ")
  25. decimal1 = float(input3)
  26. decimal2 = float(input4)
  27. result2 = decimal1 * decimal2
  28. output2 = str(result2)
  29. print(input3 + " * " + input4 + " = " + output2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement