diff --git a/01-data-model/vector2d.py b/01-data-model/vector2d.py index 178f498..e00ab36 100644 --- a/01-data-model/vector2d.py +++ b/01-data-model/vector2d.py @@ -20,5 +20,9 @@ def __add__(self, other): y = self.y + other.y return Vector(x, y) - def __mul__(self, scalar): - return Vector(self.x * scalar, self.y * scalar) + def __mul__(self, scalar=3): + return Vector(self.x * scalar.x, self.y * scalar.y) + +print(Vector(5,5)) +print(Vector(5,3)*Vector(9,8)) +print((Vector(3,4))) \ No newline at end of file