ExamVeda
Login
Home
Python Built In Functions
?

Which built-in function is used to calculate the absolute value of a number?

Answer & Solution
Correct Answer: Option A
The correct answer is Option A: abs().
The abs() function in Python is used to calculate the absolute value of a number.
It returns the magnitude of a numeric value without regard to its sign.
For example:
print(abs(-5))   # Output: 5
print(abs(3.14)) # Output: 3.14
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.