This commit is contained in:
4
point.py
4
point.py
@@ -21,10 +21,10 @@ class Point():
|
|||||||
def get_y(self):
|
def get_y(self):
|
||||||
"""Returns the Y-Coordinate of the Point"""
|
"""Returns the Y-Coordinate of the Point"""
|
||||||
return self.__y
|
return self.__y
|
||||||
def __eq__(self, other)
|
def __eq__(self, other):
|
||||||
"""Returns True if the points coordinates are the same, else returns False"""
|
"""Returns True if the points coordinates are the same, else returns False"""
|
||||||
return self.get_x() == other.get_x() and self.get_y() == other.get_y()
|
return self.get_x() == other.get_x() and self.get_y() == other.get_y()
|
||||||
def __ne__(self, other)
|
def __ne__(self, other):
|
||||||
"""Returns True if the points coordinates are the different, else returns False"""
|
"""Returns True if the points coordinates are the different, else returns False"""
|
||||||
return self.get_x() != other.get_x() or self.get_y() != other.get_y()
|
return self.get_x() != other.get_x() or self.get_y() != other.get_y()
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user