Answer to Question #327595 in Python for Boy

Question #327595

How to calculate arithmetic in python programming

1
Expert's answer
2022-04-12T13:27:12-0400
x = 15
y = 4

# Output: x + y = 19
print('x + y =',x+y)

# Output: x - y = 11
print('x - y =',x-y)

# Output: x * y = 60
print('x * y =',x*y)

# Output: x / y = 3.75
print('x / y =',x/y)

# Output: x // y = 3
# Divides the number on its left by the number on its right, rounds down the answer, and returns a whole number.
print('x // y =',x//y)

# Output: x % y = 3
# Returns the remainder of dividing two numbers.
print('x % y =',x%y)

# Output: x ** y = 50625
print('x ** y =',x**y)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS