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.
How are they related?
ReplyDeleteThey are always in the fuction.
DeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )