# Function that calculates something # Volume of a sphere # pi is in math from math import * # Function definitions def volume(radius): return (4/3) * pi * radius**3 def area_rectangle(length, width): return length*width # This will stop the following code from running when we import from this file # Feel free to leave this bit off in the lab if __name__ == "__main__": # Ok, now we use the functions rad = float(input("Enter the radius: ")) # Function call # Result shouldn't be named "volume", because that was the name of the function vol = volume(rad) print("The volume was: ", vol)