注册 登录
编程论坛 Python论坛

小白求助有关python的问题 万分感谢!

qzksyl 发布于 2019-11-01 22:58, 1315 次点击
建造一个2D的直角坐标系
class Cartesian():
    def __init__(self,xxx): # modify this line, with input (x,y)

    # the first function is to returns the length from the point to the origin
    def length_to_o(self):
        
    # consider that any 2 points (not identical) in a plane form a line, this function returns the slope and the intercept
    # that is, if the line equals y = ax + b, then this function outputs a and b
    def line(self, xxx):  # modify this line, with input (x,y
   
    # this function returns the distance between two points with Cartesian coordinate
    def length_p2p(self, xxx): # modify this line, with input (x,y)
        
   
    # this function converts a Cartesian coordinate (x,y) to polar coordinate (r, theta)
    def to_polar(self):
1 回复
#2
fall_bernana2019-11-04 09:00
回复 楼主 qzksyl
问题是什么?实现下面的每个方法?
1