Title | |
---|---|
What is the length of sys.argvWhat is the length of sys.argv?
The answer is:
B. number of arguments + 1
|
|
What is the output of the following codeWhat is the output of the following code?
The answer is:
B. [1].
|
|
How are keyword arguments specified in the function headingHow are keyword arguments specified in the function heading?
The answer is:
C. two stars followed by a valid identifier
|
|
How many keyword arguments can be passed to a function in a single function callHow many keyword arguments can be passed to a function in a single function call?
The answer is:
C. zero or more
|
|
What is the output of the following codeWhat is the output of the following code?
The answer is:
A. 3 1
|
|
What is the output of the following codeWhat is the output of the following code?
The answer is:
B. 1
|
|
What is the output of the following codeWhat is the output of the following code?
The answer is:
C. error
|
|
What is the output of the following codeWhat is the output of the following code?
The answer is:
B. False
|
|
What is the output of the following codeWhat is the output of the following code?
The answer is:
B. [0] [0, 1] [0, 1, 2].
|
|
What is the output of the following codeWhat is the output of the following code
The answer is:
A. [0].
|
|
How are variable length arguments specified in the function headingHow are variable length arguments specified in the function heading?
The answer is:
A. one star followed by a valid identifier
|
|
Which module in the python standard library parses options received from the command lineWhich module in the python standard library parses options received from the command line?
The answer is:
A. getopt
|
|
What is the type of sys.argv |
|
What is the value stored in sys.argv[0]What is the value stored in sys.argv[0]?
The answer is:
C. the program’s name
|
|
How are default arguments specified in the function headingHow are default arguments specified in the function heading?
The answer is:
A. identifier followed by an equal to sign and the default value
|
|
How are required arguments specified in the function headingHow are required arguments specified in the function heading?
The answer is:
D. identifier
|
|
What is the output of the following codeWhat is the output of the following code?
The answer is:
A. True
|
|
Where are the arguments received from the command line storedWhere are the arguments received from the command line stored?
The answer is:
A. sys.argv
|
|
What is the output of the followingWhat is the output of the following?
The answer is:
C. [0, None, 1, None, 2, None].
|
|
The output of the code shown below isThe output of the code shown below is:
The answer is:
C. 15
|
MCQs
Views
Best Answers
Points