What is a parameter | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is a parameter

Can you explain it to me?

14th Jun 2019, 2:47 AM
Mike Harris
Mike Harris - avatar
2 Answers
+ 6
A parameter is a variable in a method definition. When a method is called, the arguments are the data you pass into the method's parameters.Parameter is variable in the declaration of function. Argument is the actual value of this variable that gets passed to function. https://www.programiz.com/JUMP_LINK__&&__python__&&__JUMP_LINK-programming/function-argument
14th Jun 2019, 4:14 AM
Abhivarshini Maddala
Abhivarshini Maddala - avatar
+ 4
A parameter is arguments needed to run sonething like a function. If I have something like def function(x, y): the parameter is the values needed to use the function in the parenthesis, so x and y
14th Jun 2019, 3:46 AM
Pete Cowling
Pete Cowling - avatar