मराठी

What does the return statement do in a function? Explain with the help of an example. - Computer Science (Python)

Advertisements
Advertisements

प्रश्न

What does the return statement do in a function? Explain with the help of an example.

स्पष्ट करा
Advertisements

उत्तर

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
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2024-2025 (March) Set 4
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×