What is this j for? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is this j for?

I’m a new learner. can anyone please help me why the answer is 5.0 for the following?( sorry for the silly question). Thanks in advance Print(abs(3+4j))

4th Jun 2020, 8:37 PM
Tanji
Tanji - avatar
1 Answer
+ 5
abs() shows the absolute distance from the 0 point, for complex numbers, too. Please refer to this post below: https://www.sololearn.com/Discuss/2209933/?ref=app
4th Jun 2020, 8:55 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar