MCPcopy Create free account
hub / github.com/CodeWithHarry/The-Ultimate-Python-Course / __mul__

Method __mul__

Chapter 11 - PS/05_problem5.py:11–13  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

9 return result
10
11 def __mul__(self, other):
12 result = self.x * other.x + self.y * other.y + self.z * other.z
13 return result
14
15 def __str__(self):
16 return f"Vector({self.x}, {self.y}, {self.z})"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected