Advertisement
HotandCold

Untitled

Dec 6th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. print("Hello I am Marvin the Paranoid Android")
  2. users_name = input("What is your name?")
  3. print("Welcome " + users_name + ",please enjoy you day on this planet.")
  4. command = input("How can I help?")
  5. if command == "add" or command == "plus":
  6. input_1 = input("Please type a number -")
  7. input_2 = input("Please type another number -")
  8. number_1 = int(input_1)
  9. number_2 = int(input_2)
  10. results = number_1 + number_2
  11. output = str(results)
  12. print(input_1 +" + "+ input_2 +" = "+ output)
  13. elif command == "subtraction" or command == "minus":
  14. input_1 = input("Please type a number -")
  15. input_2 = input("Please type another number -")
  16. number_1 = int(input_1)
  17. number_2 = int(input_2)
  18. results = number_1 - number_2
  19. output = str(results)
  20. print(input_1 +" - "+ input_2 +" = "+ output)
  21. elif command == "multiplication" or command == "times":
  22. input_1 = input("Please type a number -")
  23. input_2 = input("Please type another number -")
  24. number_1 = int(input_1)
  25. number_2 = int(input_2)
  26. results = number_1 * number_2
  27. output = str(results)
  28. print(input_1 +" * "+ input_2 +" = "+ output)
  29. elif command == "division" or command == "divide":
  30. input_1 = input("Please type a number -")
  31. input_2 = input("Please type another number -")
  32. number_1 = int(input_1)
  33. number_2 = int(input_2)
  34. results = number_1 / number_2
  35. output = str(results)
  36. print(input_1 +" / "+ input_2 +" = "+ output)
  37. else:
  38. print("I do not understand that.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement