निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code ?
def printMax(a, b):
if a > b:
print(a, 'is maximum')
elif a == b:
print(a, 'is equal to', b)
else:
print(b, 'is maximum')
printMax(3, 4) A
3
B
4
C
4 is maximum
D
None of the mentioned
Explanation
Sure!
- The function checks if
a > bora == b. - Since
3is less than4, it goes to theelseblock and prints4 is maximum.
So, the output is 4 is maximum.
Answer: (C) 4 is maximum.
Correct Answer: C) 4 is maximum