Advertisement
Guest User

Untitled

a guest
Oct 15th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 KB | None | 0 0
  1. print(cool)
  2. loop = True
  3. while True:
  4. yn = input('2 or 3 Numbers: ')
  5. if yn == '2':
  6. asmd = input('What would you like to do Add Subtract Multiply Or Divide? ')
  7. if asmd == 'Add':
  8. a = 1
  9. a = int(input('First Number Please: '))
  10. b = 1
  11. b = int(input('Second Number Please: '))
  12. print(a+b)
  13. elif asmd == 'Subtract':
  14. a = 1
  15. a = int(input('First Number Please: '))
  16. b = 1
  17. b = int(input('Second Number Please: '))
  18. print(a-b)
  19. elif asmd == 'Multiply':
  20. a = 1
  21. a = int(input('First Number Please: '))
  22. b = 1
  23. b = int(input('Second Number Please: '))
  24. print(a*b)
  25. elif asmd == 'Divide':
  26. a = 1
  27. a = int(input('First Number Please: '))
  28. b = 1
  29. b = int(input('Second Number Please: '))
  30. print(a/b)
  31. else:
  32. print('That is not a choice.')
  33.  
  34. elif yn == '3':
  35. asmd = input('What would you like to do Add Subtract Multiply Or Divide? ')
  36. if asmd == 'Add':
  37. a = 1
  38. a = int(input('First Number Please: '))
  39. b = 1
  40. b = int(input('Second Number Please: '))
  41. c = 1
  42. c = int(input('Third Number Please: '))
  43. print(a+b+c)
  44. elif asmd == 'Subtract':
  45. a = 1
  46. a = int(input('First Number Please: '))
  47. b = 1
  48. b = int(input('Second Number Please:' ))
  49. c = 1
  50. c = int(input('Third Number Please: '))
  51. print(a-b-c)
  52. elif asmd == 'Multiply':
  53. a = 1
  54. a = int(input('First Number Please: '))
  55. b = 1
  56. b = int(input('Second Number Please: '))
  57. c = 1
  58. c = int(input('Third Number Please: '))
  59. print(a*b*c)
  60. elif asmd == 'Divide':
  61. a = 1
  62. a = int(input('First Number Please: '))
  63. b = 1
  64. b = int(input('Second Number Please: '))
  65. c = 1
  66. c = int(input('Third Number Please: '))
  67. print(a/b/c)
  68. else:
  69. print('That is not a choice.')
  70. else:
  71. print('That is not a choice.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement