I'm working on Python 2.7. I created a simple program that takes the radius (r = 6) of a sphere and calculates its volume. I used parentheses to try to group higher precedences together. When I used this program:
> import math as m
> sphere = (4/3)*(m.pi)*(6**3)
> print(sphere)
I obtained an incorrect value of 678.58
When I used this program:
import math as m
sphere = (4)*(m.pi)*(6**3)/3
print(sphere)
Regardless of how the parentheses were grouped, as long as I put the denominator at the end of the equation, I obtained the correct value 904.77792.