Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (4k points)

So I'm still pretty new to Python and I am still confused about using a parameter vs an argument. For example, how would I write a function that accepts a string as an argument?

1 Answer

0 votes
by (8.7k points)

These terms in general used in place of each other but the main difference between parameter and argument is that the parameter is what is something that is declared in the function, while an argument is something that is sent or passed through when there is a function call.

def Multiply (x, y):

return x*y

 

Multiply (9,5)

  •   Parameters are x and y
  •  Arguments are (9,5) passed when call is to make to the function.

Interested in Python, Check out Python Certification to get More updated by Intellipaat  

Related questions

Browse Categories

...