Robotics & Artificial Intelligence

Which of the following statements is true about fixed length arguments in Python functions?

  1. They allow an indefinite number of arguments to be passed.
  2. They can only accept one argument.
  3. They require a predefined number of arguments.
  4. They allow values to be passed but not variables.

Python Functions

2 Likes

Answer

They require a predefined number of arguments.

Reason — Fixed length arguments in Python functions mean that the number of arguments to be passed is already defined in the function definition. When such a function is called, it must be provided with exactly the same number of arguments, otherwise an error occurs.

Answered By

1 Like


Related Questions