Q. What are arguments? What are parameters? How these two terms are different yet related? Give example.


Answer =

Argument: - A value provided to a function in the function call statement.

Parameter: - A name used inside a function to refer to the value which was passed to it as an argument.

For example: -

def addEm(x, y, z) :
    print(x + y + z)
addEm(6, 16, 26)

• In the above code, arguments are 6, 16 and 26; and parameter are x, y and z.

2 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post