Q52
What is the purpose of the built-in function abs()?
A.
Returns the absolute value of a number
AnswerB.
Converts a string to lowercase
C.
Rounds a floating-point number to the nearest integer
D.
Returns the sum of two numbers
Answer: Option A
Solution
Answer: Option A
Solution:
The abs() function in Python returns the absolute value of a number, which is the distance of the number from zero on the number line, regardless of its sign.