issue with required parameter

33 Views Asked by At

Create a new function named defaults with two parameters:

my_optional which has a default value of True my_required which is a required param and has no default value Return the following logical comparison:

my_optional is my_required Expected Output

defaults(True) True

defaults(True, False) False

defaults(False, False) True

def defaults(my_optional, my_required) my_optional = True return my_optional is my_required

i received the error *defaults is missing positional argument: my_required

0

There are 0 best solutions below