Vidyalelo
Python · Q44

Python Built

Programming · Python · question 44

Q44

What will be the output of the following Python function? min(max(False,-3,-4), 2,7)

A.
2
B.
False
C.
-3
Answer
D.
-4

Answer: Option C

Solution

Answer: Option C
Solution:
The correct answer is Option C: -3.
Let's break down the expression:

The max() function returns the largest of the arguments passed to it.
So, max(False, -3, -4) evaluates to -3 because False is considered as 0.
Then, the min() function returns the smallest of the arguments passed to it.
Thus, min(-3, 2, 7) evaluates to -3, as it's the smallest among the given numbers.