+ 1

Why there is no any errors?

list = [5j] print (list)

29th Aug 2017, 2:06 PM
Alexik
Alexik - avatar
1 Antwort
+ 3
5j is a complex number: 5 * sqrt(-1) cplx=5j print(cplx.real, cplx.imag, cplx.conjugate()) # 0.0 5.0 -5j print(cplx * cplx) # (-25+0j) print(cplx % 2) #TypeError: can't mod complex numbers
29th Aug 2017, 4:00 PM
Kirk Schafer
Kirk Schafer - avatar