0
What's the difference between calling a function and returning a function?
I'm quite confused 🤔 with this quote.. cn anyone help to move out from this problem
2 ответов
+ 1
A function is something whic take parameters and do some calculations and operations and returns value.
Now your question is what are they
Function: It is simply a set of various processes
Return value: It is final result after all calculations are done. Which is returned by function from where it is called.
+ 1
Calling a function means saying function, do this. You basically call a function, you don't return it.
A function can do something, print something or return something. That's where the return comes in.
Example of return:
def add(x,y):
return x + y
You then call the function with:
add(value of x, value of y)
If you want the result printed:
print(add(value of x, value of y))
Happy Coding 😀