0

I have to get pthagaros to get the distance between 2 points. so the function distanceBetweenPoints(Point(1, 2), Point(4, 6)) should result in 5.0. the parameters are supposed to be P1, P2, which i think i have done?. The get an error when i try to execute this?.. help please

def distanceBetweenPoints(p1, p2):

return float(math.sqrt((p2-p1)**2+(p2-p1)**2))