Guest User

Untitled

a guest
Feb 4th, 2021
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.13 KB | None | 0 0
  1. print("Welcome to limited arithmetic")
  2. print("Today we will addd, deevide, subtract, and mulchiply")
  3. calculations = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
  4. fourth_wall = input("Please select a number to perform math: ")
  5. fifths_wall = input("Please select a second number to perform math: ")
  6. calculations.append(fourth_wall)
  7. calculations.append(fifths_wall)
  8. print("here's your updated calculator: ", calculations)
  9. print("")
  10. sum = float(fourth_wall) + float(fifths_wall)
  11. differece = float(fourth_wall) - float(fifths_wall)
  12. differece2 = float(fifths_wall) - float(fourth_wall)
  13. sum2 = float(fifths_wall) + float(fourth_wall)
  14. product1 = float(fourth_wall) * float(fifths_wall)
  15. product2 = float(fifths_wall) * float(fourth_wall)
  16. divijion = float(fifths_wall) / float(fourth_wall)
  17. division2 = float(fourth_wall) / float(fifths_wall)
  18. print("This is the additions: ", sum, sum2)
  19. print("This is the subtractions: ", differece, differece2)
  20. print("This is the products: ", product1, product2)
  21. print("This is the devisions: ", divijion, division2)
  22.  
  23. print("Thank you for using my calculator!")
  24. print("return 0;")
  25.  
  26.  
  27.  
Advertisement
Add Comment
Please, Sign In to add comment