Computer Science
What will be the output on screen after executing: print(math.fabs(-6.4)) ?
- -6.4
- 6.4
- 4
- 6
Python Modules
1 Like
Answer
6.4
Reason — The math.fabs() function returns the absolute value of a number. For math.fabs(-6.4), it returns 6.4, which is the positive magnitude of the number.
Answered By
3 Likes