Computer Science
Assertion. If the arguments in a function call statement match the number and order of arguments as defined in the function definition, such arguments are called positional arguments.
Reason. During a function call, the argument list first contains default argument(s) followed positional argument(s).
Python Functions
1 Like
Answer
(c)
Assertion is true but Reason is false.
Explanation
If the arguments in a function call statement match the number and order of arguments as defined in the function definition, such arguments are called positional arguments. During a function call, the argument list first contains positional argument followed by default arguments because any parameter cannot have a default value unless all parameters appearing on its right have their default values.
Answered By
2 Likes
Related Questions
Assertion. A parameter having a default value in the function header is known as a default parameter.
Reason. The default values for parameters are considered only if no value is provided for that parameter in the function call statement.
Assertion. A function declaring a variable having the same name as a global variable, cannot use that global variable.
Reason. A local variable having the same name as a global variable hides the global variable in its function.
A program having multiple functions is considered better designed than a program without any functions. Why ?
What all information does a function header give you about the function ?