Explain with a code example the usage of default argument and keyword argument.
Default Argument def power(x,y=3): for i in range(y): r=r*x return r a=intinput((“Enter Base”)) b=intinput((“Enter Exponent”)) total = power(a,b) print(total) Usage of Default Argument: •Matching arguments are not passed in the function call statement •Some argument always have same value. Keyword Argument def power(x,y): for i in range(y): r=r*x […]
Explain with a code example the usage of default argument and keyword argument. Read More »