[HELP] Can I use a parameter of a user defined function as a variable in the main function?
No description. That is what it is.
no user defined functions also cannot act as variables
No, you can't. A method can't act like a variable.
No, if you pass a parameter, you need to send the value of that parameter through another variable or value. But the parameter in a function should be used inside the function.
Seems like we cant give user input to it. check a code https://code.sololearn.com/c0IMJwXfJnfR/?ref=app
I'm not taking about the whole method, what about the parameters it has?
example you gave illustrated scope of x. You seem to think x of the function is the same x in the program. It is not unless you are using a global var x. The only ways to get an output from your function call 1. Set default value for parameter 2. Pass in x (e.g. func(x))