Computer Science, asked by dabbi4647, 1 year ago

A function defined in the following way:
def function(x=0):
return x
A)may be invoked without any argument ,or with just one
B)must be invoked without arguments
C)may be invoked woth any number of arguments (0)
D)must be invoked with exactly one arguments

Answers

Answered by sailorking
0

According to the question, the answer is option A) may be invoked without any argument, or just one argument. The reason behind the answer is, it is known that any function having any arguments, which has some defaults values set before hand, then there are two options available :-

  1. The first option is to call the function with a single argument, which will become the value of x.
  2. The second option is to, not to pass any arguments and in such case the default value in the arguments, will automatically gets assigned.
Similar questions