निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
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)
B)
C)
D)
Explanation:
Sure!
- The function checks if
a > b
ora == b
. - Since
3
is less than4
, it goes to theelse
block and prints4 is maximum
.
So, the output is 4 is maximum.
Answer: (C) 4 is maximum.