Top 1000+ Solved Problem Solving and Python Programming MCQ Questions Answer

From 796 to 810 of 820

Q. who('Arthur')

a. arthur sir

b. sir arthur

c. arthur

d. none of the mentioned

  • b. sir arthur

Q. min(101*99, 102*98)

a. 9997

b. 9999

c. 9996

d. none of the mentioned

  • c. 9996

Q. What is a variable defined outside a function referred to as?

a. a static variable

b. a global variable

c. a local variable

d. an automatic variable

  • b. a global variable

Q. What is a variable defined inside a function referred to as?

a. a global variable

b. a volatile variable

c. a local variable

d. an automatic variable

  • c. a local variable

Q. , i = 2)

a. an exception is thrown because of conflicting values

b. 1 2

c. 3 3

d. 3 2

  • d. 3 2

Q. ,2,3,4)

a. integer

b. tuple

c. dictionary

d. an exception is thrown

  • b. tuple

Q. If a function doesn’t have a return statement, which of the following does the function return?

a. int

b. null

c. none

d. an exception is thrown without the return statement

  • c. none

Q. ',B='2')

a. string

b. tuple

c. dictionary

d. an exception is thrown

  • c. dictionary

Q. What is the type of each element in sys.argv?

a. set

b. list

c. tuple

d. string

  • d. string

Q. What is the length of sys.argv?

a. number of arguments

b. number of arguments + 1

c. number of arguments – 1

d. none of the mentioned

  • b. number of arguments + 1

Q. How are keyword arguments specified in the function heading?

a. one-star followed by a valid identifier

b. one underscore followed by a valid identifier

c. two stars followed by a valid identifier

d. two underscores followed by a valid identifier

  • c. two stars followed by a valid identifier

Q. How many keyword arguments can be passed to a function in a single function call?

a. zero

b. one

c. zero or more

d. one or more

  • c. zero or more

Q. ): print(foo(i))

a. [0] [1] [2]

b. [0] [0, 1] [0, 1, 2]

c. [1] [2] [3]

d. [1] [1, 2] [1, 2, 3]

  • b. [0] [0, 1] [0, 1, 2]

Q. How are variable length arguments specified in the function heading?

a. one star followed by a valid identifier

b. one underscore followed by a valid identifier

c. two stars followed by a valid identifier

d. two underscores followed by a valid identifier

  • a. one star followed by a valid identifier
Subscribe Now

Get All Updates & News