예제 #1
0
 def __init__(self, p1, sides,length):
     GeometricObject.__init__(self)
     self.start = p1
     self.sideLength = length
     self.numsides = sides
예제 #2
0
 def __init__(self, p1,r):
     GeometricObject.__init__(self)
     self.center = p1
     self.radius = r
예제 #3
0
파일: line.py 프로젝트: nmessa/Python-2020
 def __init__(self, p1,p2):
     GeometricObject.__init__(self)
     self.p1 = p1
     self.p2 = p2
예제 #4
0
파일: point.py 프로젝트: nmessa/Python-2020
 def __init__(self, x,y):
     GeometricObject.__init__(self)
     self.x = x
     self.y = y
예제 #5
0
 def __init__(self, r=1.0, color="white", filled=True):
     '''creates a circle with radius r'''
     GeometricObject.__init__(self, color, filled)
     self._r = r
예제 #6
0
 def __str__(self):
     return "Triangle: side 1 = " + str(self. _s1) + " side 2 = " + str(self._s2) +\
            " side 3 = " + str(self._s3) + " " + GeometricObject.__str__(self)
예제 #7
0
 def __init__(self, s1=1.0, s2=1.0, s3=1.0, color="white", filled=True):
     GeometricObject.__init__(self, color, filled)
     self._s1 = s1
     self._s2 = s2
     self._s3 = s3
예제 #8
0
 def __str__(self):
     '''Circle with center (x, y) and radius radius'''
     return "Circle: radius = " + str(
         self._r) + " " + GeometricObject.__str__(self)