May-07-2019, 12:40 PM
(May-07-2019, 12:36 PM)mcgrim Wrote: How do I actually make sure that 1+2i and 1-2i are printed ?
change your __repr__ function accordingly (i.e. to output what you want)
I think there is some confusion as it's not clear what you want to achieve
>>> complex(1, 2) (1+2j) >>> complex(1, 2).conjugate() (1-2j) >>>
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs