Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Here you will see the examples of all operators that python has.")
- x = input()
- x = float(x)
- y = input()
- y= float(y)
- print(f'You have chosen [{x}] and [{y}].')
- addition = x + y
- substraction = x - y
- abssubstraction = abs(substraction)
- multiplication = x * y
- division1 = x / y
- division2 = int(x // y)
- power = x ** y
- multiplication2 = round(multiplication)
- remainder = x % y
- print(f'Addition of your numbers produces [ {addition} ].')
- print(f'Substraction of your numbers produces [ {substraction} ].')
- print(f'Multiplication of your numbers produces [ {multiplication} ].')
- print(f'Division of your numbers with decimals produces [ {division1} ].')
- print(f'Division of your numbers without decimals produces [ {division2} ].')
- print(f'Making your first number to the power of second gives us [ {power} ].')
- print(f'Rounded multiplication of your numbers produces [ {multiplication2} ].')
- print(f'Remainder of your numbers produces [ {remainder} ].')
- print(f'Absolute numberof your substraction gives us [ {abssubstraction} ].')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement