निम्नलिखित कोड का परिणाम क्या है ?
What is the output of the following code ?
def fun(a, b=6):
a=a+b
print(a)
fun(5, 4)
A)
B)
C)
D)
Explanation:
Sure!
The function adds a
and b
.
In fun(5, 4)
, a = 5
and b = 4
, so 5 + 4 = 9
.
The output is 9.
Answer: (B) 9.