What is the result of abs(-5) in Python?
-
A
5
Correct answer
-
B
-5
-
C
0
-
D
Error
15 views
Explanation
The abs() function returns the absolute value of a number, so abs(-5) equals 5.
Doubts & discussion
Not sure why the answer is A? Ask here and get an explanation.
Ask a doubt about this MCQ