In: Advanced Math
Use the Function Design Recipe (FDR) to design, code and test the definition of a new function named distance. This function returns the distance between two points, given by the coordinates (x1, y1) and (x2, y2). The function parameters are the x and y values.
Need help. Thank you
def area_of_circle(x1:'float',y1:'float' ,
x2:'float',y2:'float') -> 'float':
"""
function that takes 2 points the
cener of circle x1,y1
and point on the permieter x2,y2
and returns the
area of the circle
"""
#calculate the distance between center and point
#then find the area of that distance.
return area_of_disk(distance(x1,y1,x2,y2))
x1,y1 = 10,20
x2,y2 = 6,10
print("\nArea of Disk of radius 10 :",area_of_disk(10))
print("\nDistance between point ({},{}) , ({},{}) is {}".format(x1,y1,x2,y2,distance(x1,y1,x2,y2)))
print("\nArea of the circle for above points. ({},{}) , ({},{}) is {}".format(x1,y1,x2,y2,area_of_circle(x1,y1,x2,y2)))