The volume of a sphere is 4/3πr3, where π has the value of "pi". Write a function called print_volume (r) that takes an argument for the radius of the sphere, and prints the volume of the sphere.

Call your print_volume function three times with different values for radius.

Answer :

MrRoyal

Answer:

In Python:

def print_volume (r):

   volume = 4/3 * 3.142*r**3

   print(volume)

print_volume(7)

print_volume(14)

print_volume(22)

Explanation:

This defines the function and takes radius r as the parameter

def print_volume (r):

This calculates the volume

   volume = 4/3 * 3.142*r**3

This prints the volume

   print(volume)

The next three lines call the function with different values

print_volume(7)

print_volume(14)

print_volume(22)

Other Questions