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

Method __init__

Chapter 11 - PS/05_problem5.py:2–5  ·  view source on GitHub ↗
(self, x, y, z)

Source from the content-addressed store, hash-verified

1class Vector:
2 def __init__(self, x, y, z):
3 self.x = x
4 self.y = y
5 self.z = z
6
7 def __add__(self, other):
8 result = Vector(self.x + other.x, self.y + other.y, self.z + other.z)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected