Commit 20c6adca authored by Vishwajeet404's avatar Vishwajeet404

mysquare method added

parent c4918cd0
......@@ -60,4 +60,12 @@ class ComplexNumber:
z = self*y
return z
def mysquare(variable):
return variable*variable
a = ComplexNumber(1,1)
print(a)
b = ComplexNumber.mysquare(a)
print(b)
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