🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

नीचे दिए गए प्रोग्राम का आउटपुट क्या है?

What is the output of below program ?

def maximum(x, y):
    if x > y:
       return x
    elif x == y:
       return 'The numbers are equal'
    else:
       return y
print(maximum(2, 3)) 
A)
B)
C)
D)

Explanation:

The function maximum(x, y) compares two values x and y.

  1. If x > y, it returns x.
  2. If x == y, it returns the string 'The numbers are equal'.
  3. Otherwise, it returns y.

In this case, we call maximum(2, 3):

  • 2 is less than 3, so the function will return 3.

Hence, the output will be (B) 3

Latest Updates