+ 1
Bruh how to delete 0j thing
I have a strange 0j thing in the output https://code.sololearn.com/cjPXWGC7Qg0C/?ref=app
4 Respostas
+ 8
Python uses j to represent complex numbers. Here's some information on what complex numbers are and why Python uses j instead of i.
https://www.mathsisfun.com/numbers/complex-numbers.html
https://stackoverflow.com/questions/24812444/why-are-complex-numbers-in-python-denoted-with-j-instead-of-i
+ 6
All numbers can be expressed (in Python) as:
a+bj
For real constants a and b where j=sqrt(-1)
For real numbers, they have no imaginary part so b = 0.
To correct your code, you could use math instead of cmath.
+ 1
By the way, don’t use semicolons in Python unless you write two statements on one line (not generally recommended anyway)