ExamVeda
Login
Home
Python Built In Functions
?

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

Answer & Solution
Correct Answer: Option C
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.
Examveda
Question posted by Examveda
Community

Join the Discussion

1 Comment
Raman Singh
Raman Singh 2 years ago
Seriously!!
such a wrong explanation
The correct answer is False
and how can -3 is greater than 0.
what kind of math are you teaching