what should be the value of i to the power i where i=square root of -1 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

what should be the value of i to the power i where i=square root of -1

logically i should get 0.209 but python gv me an answer of -1.why?

9th Mar 2018, 10:44 AM
Girish Vaisyaraj
Girish Vaisyaraj - avatar
3 Answers
+ 3
a=complex("j") print(a**a) This returns the correct value. Maybe you forgot the ** and wrote * ?
9th Mar 2018, 11:39 AM
Kinshuk Vasisht
Kinshuk Vasisht - avatar
0
my bad i forgot to use root for -1
9th Mar 2018, 12:32 PM
Girish Vaisyaraj
Girish Vaisyaraj - avatar
0
yeah, -1**(-1) is -1...
9th Mar 2018, 8:10 PM
Amaras A
Amaras A - avatar