Python Forum
what does x reprsent in this code ?
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
what does x reprsent in this code ?
#9
in the function definition (line 1) food is a parameter.
when you call the function on line 7, you pass fruits as arguments to the function. That is the actual value of food in this particular call of the function.
There are positional and keyword parameters/arguments. check the links for more details. In this case food is positional parameter.

read our tutorial on functions: https://python-forum.io/Thread-Basic-Functions
also glossary for parameters and arguments
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
RE: what does x reprsent in this code ? - by buran - Apr-09-2020, 02:25 PM
RE: what does x reprsent in this code ? - by buran - Apr-10-2020, 07:20 PM
RE: what does x reprsent in this code ? - by buran - Apr-19-2020, 01:49 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020