English

Assertion (A): If the arguments in function call statement match the number and order of arguments as defined in the function definition, such arguments are called positional arguments. Reasoning - Computer Science (Python)

Advertisements
Advertisements

Question

Assertion (A): If the arguments in function call statement match the number and order of arguments as defined in the function definition, such arguments are called positional arguments.

Reasoning (R): During a function call, the argument list first contains default argument(s) followed by the positional argument(s).

Options

  • Both A and R are true and R is the correct explanation for A.

  • Both A and R are true and R is not the correct explanation for A.

  • A is True but R is False.

  • A is false but R is True.

MCQ

Solution

A is True but R is False.

Explanation:

If the arguments in a function call 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 should first contain the positional argument(s) followed by default argument(s).

Thus,

  • The assertion is true.
  • The reasoning is false.

So, the correct answer is A is True but R is False.

shaalaa.com
Arguments and Parameters
  Is there an error in this question or solution?
2022-2023 (March) Sample
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×