Advertisements
Advertisements
Question
What does the return statement do in a function? Explain with the help of an example.
Explain
Advertisements
Solution
The return statement either returns the control to the calling function or returns a value from the called function to the calling function.
def Mul(A,В) :
return A*B:
m = Mul (100,200)
Here, the Mul() function receives A, B, and returns the product of A and B to m.
shaalaa.com
Is there an error in this question or solution?
