import math class Point: def __init__(self, x, y): self.x = x self.y = y class Line: def __init__(self, point_a, point_b): self.point_a = point_a self.point_b = point_b def get_distance(P, L): # TODO: 计算点P到直线L的距离 xb, xa, xp, ya, yb, yp = L.point_b.x, L.point_a.x, P.x, L.point_a.y, L.point_b.y, P.y r...