0

What is parameter in python, what is attribute ?

Can you explain

7th Mar 2020, 4:36 PM
Arun Kumar
Arun Kumar - avatar
2 ответов
+ 3
As this question is asked very often, you can find further information by using the search bar of q&a in sololearn app. You can also use search bar in learn section to find documents and tutorials.
7th Mar 2020, 8:26 PM
Lothar
Lothar - avatar
+ 1
in every programming language, parameters are those variables that we create inside () when we create a function, it serves to receive values from outside, which are called arguments example: def Sum (x, y): return x + y; Sum (3.5) This will return 8, where x and y are parameters, and 3 and 5 are arguments Since attributes are the name given to variables that are created within a class, you can think that everything within a class changes its name, therefore Function, within a class is called Method Variables, within a class is called Attributes Hope this helps
7th Mar 2020, 5:05 PM
Wardy Spirit
Wardy Spirit - avatar