Last answered:

01 Feb 2021

Posted on:

29 Mar 2020

0

argument meaning

what do you mean by argument of five? in code
""""""""""""""""""def five(x)
how to define it
also what does the return(x) means after defining argument

3 answers ( 0 marked as helpful)
Instructor
Posted on:

30 Mar 2020

0
Hi Tushar! 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.
Best,
Martin
Posted on:

31 Mar 2020

0
oh my god, thanks. you made it so easy to understand.

Instructor
Posted on:

01 Feb 2021

0

sсс

Submit an answer