diff --git a/labs04/task03.py b/labs04/task03.py index 9f22b70..b238a96 100644 --- a/labs04/task03.py +++ b/labs04/task03.py @@ -16,7 +16,7 @@ class Point: if is_numeric(coordinates): self.coordinates = coordinates else: - raise Exception("Coordinates are not numeric") + raise DimensionError("Coordinates are not numeric") def to_string(self): return str(self.coordinates) @@ -47,11 +47,12 @@ def add(point_1, point_2): if __name__ == "__main__": new_point = Point([5, 10, 12, 6]) - print(new_point.__len__()) + new_point.to_string() + new_point.__len__() new_point_2 = Point([12, 23, 21, 16]) print(new_point_2.__str__()) new_point_3 = add(new_point, new_point_2) print('1st point =', new_point) print('2nd point =', new_point_2) - print('1st point + 2nd point = ', new_point_3) + print('1st point + 2nd point = ', new_point_3) \ No newline at end of file