Python Concept Learning Point 2: What is the difference between arguments and parameters?

Table of Contents
  • Parameters are the name appear in the function definition.
  • Arguments are the value that actually pass to a function.
  • Parameter control what value(parameter) should pass to a function.
def calcaulate_book_cost (number_of_books):
    return number_of_books * 3

print(calcaulate_book_cost(4))

In the above example, number_of_books is the parameter, since it appears in the definition of the function.
4 is the argument, since it appear in the function calling and it is the value actually pass to the function to process.

Credit

Python doc (Accessed at 2022 JUN 09)

Leave a Reply