what do you mean by argument of five? in code
how to define it
also what does the return(x) means after defining argument
Thanks for reaching out!
When we define a function, by typing five(x), x is a parameter. I.e. x indicates that in its place, there will be a value, with which a certain operation will be applied.
In our (very simple) function, the operation to be applied is x = 5.
Then, when you call/invoke the function, which means – when we use it in practice (i.e. after it has been defined), then we don’t use parameters anymore. We use arguments instead.
So, argument is just a different term that we use when a certain function has been applied.
Therefore, in our example, we define a function called five with a parameter x. The operation to be applied is x = 5, which means that whichever argument we use when calling the function, it will be made equal to 5.
return (x) is a command that indicates what value we want the function to return to us.
Please remember that all these explanations will be made clearer in the Functions section of the course.
Hope this helps.
oh my god, thanks. you made it so easy to understand.
Great! You are welcome!