1.

What is displayed on executing print(math.fabs(-3.4))?(a) -3.4(b) 3.4(c) 3(d) -3The question was posed to me in a national level competition.My doubt stems from Math in division Mapping Functions and Modules of Python

Answer»

The correct OPTION is (b) 3.4

The best EXPLANATION: A NEGATIVE FLOATING point number is returned as a POSITIVE floating point number.



Discussion

No Comment Found

Related InterviewSolutions