0
What are arguments
4 Respostas
+ 3
Def function(a):
pass
Here a is parameter
And calling function(5)
5 is argument
+ 2
Arguments >value parsed to a function or variable (when calling it ).
+ 2
arguments can usually refer to parameters of a function.
python:
def sum(a,b):
return a + b
sum(2,3) here the function takes exactly two arguments (2 and 3), which are the a and b parameters
0
Using a mnemonic can help - Pastor Agrees meaning Pastor - Parameter and Agrees - Argument.
Parameter is defined with the fucntion and Arguments are defined when you call the function.
In conclusion, with the mnemonics, you know parameters come before arguments.