摘要: 试写一个python程序,求平面直角坐标系中两点的距离: class Coordinate: def __init__(self,x,y): self.x=x self.y=y def distance(self,other): x_diff_sq=(self.x-other.x)**2 print 阅读全文
posted @ 2024-02-18 14:30 小虾米爱吃鱼 阅读(6) 评论(0) 推荐(0) 编辑