#------------------------------------------------------------------------------ # Circle2.py # Uses functions #------------------------------------------------------------------------------ import math # circle_area() # computes the area of a circle def circle_area(r): a = math.pi*(r**2) return a # end circle_area() # circle_circumference() # computes the circumference of a circle def circle_circumference(r): c = 2*math.pi*r return c # end circle_circumference() #-- main program -------------------------------------------------------------- print() # blank line # get the radius of a circle radius_string = input("Enter the radius of a circle: ") r = float(radius_string) # print the circumference and area of the circle print("The area of the circle is:", circle_area(r)) print("The circumference of the circle is:", circle_circumference(r)) print() # blank line # get the radius of another circle radius_string = input("Enter the radius of another circle: ") r = float(radius_string) # print the circumference and area of the circle print("The area of the circle is:", circle_area(r)) print("The circumference of the circle is:", circle_circumference(r)) print() # blank line # end program -----------------------------------------------------------------