Report Bug

Qus

What will be the output of the following Python function?

import math
print(abs(math.sqrt(25)))
Qus

निम्नलिखित Python फ़ंक्शन का आउटपुट क्या होगा?

import math
print(abs(math.sqrt(25)))


A. Error
B. -5
C. 5
D. 5.0


Solution
D. 5.0



Explanation
The abs() function prints the absolute value of the argument passed. For example: abs(-5)=5. Hence, in this case we get abs(5.0)=5.0.
Latest Current Affairs 2024 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad