निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code?
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(2, 3)
compares the values 2 and 3:
- Since 2 is less than 3, it will return
y
(which is 3).
Thus, the output is 3.
Answer: (B) 3.