QuestionQ24

VerifiedFunctions and Exceptions

Consider the following snippet:

Question Image

Explanation

A function with two required positional parameters must be called with values for both parameters unless one has a default value. Calling func(2) omits the required b argument, so Python raises a TypeError.

Community Discussion

No comments yet. Be the first to start the discussion!