Question #366

What is the output of the code snippet below?
k=lambda x,y : x%y
print(k(36,32)+ k(15,10))

On line 2, k(36,32) invokes a lambda expression by passing x as 36 and y as 32 and returns 4 . Similarly, k(15,10) invokes a lambda expression by passing x as 15 and y as 10 and returns 5 . Both the return values are summed up before printing. Thus the output is (5+4): 9. (w3schools.com/python/python_lambda.asp)


Comment on Disqus:

Comment on Twitter:

Question difficulty: 🔵🔵🔵🔵🔵