Examveda

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

A. 2

B. False

C. -3

D. -4

Answer: Option C

Solution (By Examveda Team)

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.

This Question Belongs to Python Program >> Python Built In Functions

Join The Discussion

Comments (1)

  1. Raman Singh
    Raman Singh:
    1 year 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

Related Questions on Python Built In Functions