#volume.py

# a program to compute the volume of a sphere with a given radius.



print "This program computes the volume of a sphere with a given radius"

r = input("Please enter the radius of the sphere (r): ")



import math #Makes the math library available.  

A= (math.pi)*(4.0/3.0)*(r**3)

print "A= ", A;



B= (math.pi)*(4.0/3.0)*((2.0*r)**3)

print "B= ", B;



C=100*(abs((A-B)/B))

print "C= ", C;









"""

The advantage of of this coding would be that we would not need to type in the values for both A ans B separately. By typing in the value for the radius, we can get the values for both A and B.



        r         A                B             C

        4     268.082573106    2144.66058485    87.5

        0        0.0             0.0            error

       4/9       0.0             0.0            error

"""



