Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.03 KB | None | 0 0
  1. print("Here you will see the examples of all operators that python has.")
  2. x = input()
  3. x = float(x)
  4. y = input()
  5. y= float(y)
  6. print(f'You have chosen [{x}] and [{y}].')
  7. addition = x + y
  8. substraction = x - y
  9. abssubstraction = abs(substraction)
  10. multiplication = x * y
  11. division1 = x / y
  12. division2 = int(x // y)
  13. power = x ** y
  14. multiplication2 = round(multiplication)
  15. remainder = x % y
  16. print(f'Addition of your numbers produces [ {addition} ].')
  17. print(f'Substraction of your numbers produces [ {substraction} ].')
  18. print(f'Multiplication of your numbers produces [ {multiplication} ].')
  19. print(f'Division of your numbers  with decimals produces [ {division1} ].')
  20. print(f'Division of your numbers  without decimals produces [ {division2} ].')
  21. print(f'Making your first number to the power of second gives us [ {power} ].')
  22. print(f'Rounded multiplication of your numbers produces [ {multiplication2} ].')
  23. print(f'Remainder of your numbers produces [ {remainder} ].')
  24. print(f'Absolute numberof your substraction gives us [ {abssubstraction} ].')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement