Math domain error | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Math domain error

I am wrote code and i am had an a error, "Math domain error", why? How to fix it? https://code.sololearn.com/cU7NtZgaY2d2/?ref=app

24th Mar 2022, 8:35 AM
MeGaN
1 Resposta
+ 1
it's because : list.append(num-i) will result in negative numbers num2 is negative by the last assignment, math.sqrt(num2) is a complex number.
24th Mar 2022, 8:48 AM
Bahhaāµ£
Bahhaāµ£ - avatar