Commit 5aac71eb authored by RISHABH GARG's avatar RISHABH GARG

Str changed

parent 01273c3b
......@@ -26,9 +26,9 @@ class ComplexNumber:
def __div__(self,c):
return ComplexNumber(self.a/c, self.b/c)
def __str__(self):
return str(self.a)+"+i"+str(self.b)
return str(self.a)+"+j"+str(self.b)
def __repr__(self):
return str(self.a)+"+i"+str(self.b)
return str(self.a)+"+j"+str(self.b)
def mysquare(self):
return ComplexNumber(self.a**2-self.b**2,2*self.a*self.b)
def __radd__(self,c):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment