Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> ================================ RESTART ================================ >>> >>> ================================ RESTART ================================ >>> >>> p1 = Point(3,4) >>> p1 <__main__.Point object at 0x00ED1A70> >>> ================================ RESTART ================================ >>> >>> p1 = Point(3,4) >>> p1 Point(3,4) >>> ================================ RESTART ================================ >>> >>> p1 = Point(3,4) >>> p1.is_origin() False >>> p2 =Point() >>> p2.is_origin() True >>> Point.is_origin(p1) False >>> p1==p2 False >>> p3 = Point(3,4) >>> p1 Point(3,4) >>> p1==p3 False >>> ================================ RESTART ================================ >>> >>> ================================ RESTART ================================ >>> >>> ================================ RESTART ================================ >>> >>> p1==p3 True >>> ================================ RESTART ================================ >>> >>> p2>> p2>> p2>> p2<=p2 Traceback (most recent call last): File "", line 1, in p2<=p2 TypeError: unorderable types: Point() <= Point() >>> ================================ RESTART ================================ >>> >>> p1.add(p3) Point(6,8) >>> p1 Point(3,4) >>> p3 Point(3,4) >>> p1.add(Point(5,12)) Point(8,16) >>> p1 Point(3,4) >>> Point.add(p1,p1) Point(6,8) >>> Point.add(p1,55) Point(58,59) >>> ================================ RESTART ================================ >>> >>> p1.increment(4) >>> p1 Point(7,8) >>> x = p1.increment(Point(2,-1)) >>> p1 Point(9,7) >>> x >>> print(x) None >>> p1+p2 Traceback (most recent call last): File "", line 1, in p1+p2 TypeError: unsupported operand type(s) for +: 'Point' and 'Point' >>> ================================ RESTART ================================ >>> >>> p1+p2 Point(3,4) >>> ================================ RESTART ================================ >>> >>> p1.isExtreme(p2, Point(6,7), Point(-3,-3)) False >>> type(p1) >>> ================================ RESTART ================================ >>> >>> r = Rectangle1(p1, Point(5,7)) >>> r Rectangle with lower left Point(3,4) and upper right Point(5,7) >>> r.area() 6 >>> r.transpose() >>> r Rectangle with lower left Point(0,2) and upper right Point(3,4) >>> r2 = Rectangle2(p1, 3, 2) >>> r2.area() 6 >>> r1==r1 Traceback (most recent call last): File "", line 1, in r1==r1 NameError: name 'r1' is not defined >>> r==r True >>> r==r2 False >>>