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
1 Answer
+ 3
One is the modulus (square root of 3^2 + 4^2), other is square of the modulus
print Complex(3,-4). abs.to_i Complex(3,4) abs2.to_i