We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9545d35 commit da78915Copy full SHA for da78915
1 file changed
Level_07/OOP2.py
@@ -72,6 +72,7 @@ def __radd__(self, o: float) -> "C":
72
73
Hierbei ändert sich einfach nur der Realteil.
74
"""
75
+ assert isinstance(o, float)
76
return C(self.real + o, self.imag)
77
78
def __mul__(self, o: Complex) -> "C":
@@ -90,6 +91,7 @@ def __rmul__(self, o: float) -> "C":
90
91
92
Hierbei ändert sich nur der Realteil.
93
94
95
return C(self.real * o, self.imag)
96
97
def __pow__(self, o: int) -> "C":
0 commit comments