Why the output is 525? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why the output is 525?

print Complex(3,-4). abs.to_i Complex(3,4) abs2.to_i

6th Aug 2019, 10:59 AM
takeru
takeru - avatar
1 Answer
+ 3
One is the modulus (square root of 3^2 + 4^2), other is square of the modulus
6th Aug 2019, 5:46 PM
Paolo De Nictolis
Paolo De Nictolis - avatar