Arguments are the value(s) provided in function call/invoke
statement.
List of arguments should be supplied in same way as parameters are listed.
Bounding of
parameters to arguments is done
1:1, and so there should be same number and type of arguments as mentioned
in parameter list.
Example: Arguments in function call
>>> SI (1000,2,10)
1000,2,10 are arguments. An argument can be constant,
variable, or expression.
Example: Write the output from the following function:
def SI(p,r=10,t=5):
return(p*r*t/100)
if we use following call statement:
SI(10000)
SI(20000,5)
SI(50000,7,3)
Output
>>> SI(10000)
5000
>>> SI(20000,5)
5000
>>> SI(50000,7,3)
10500
No comments:
Post a Comment