The correct answer is: A. not omit any other arguments.
When a program calls a function that has default parameters, if you omit an argument, you must not omit any other arguments. The default value for the omitted argument will be used.
For example, consider the following function:
def foo(x, y=10):
print(x, y)
If we call this function as follows:
foo(5)
The value of x
will be 5 and the value of y
will be 10.
However, if we call this function as follows:
foo()
The value of x
will be 0 and the value of y
will be 10. This is because the default value for y
is 10, and since we did not specify a value for x
, the default value for x
is 0.
In general, when a program calls a function that has default parameters, if you omit an argument, you must not omit any other arguments. The default value for the omitted argument will be used.