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

From 661 to 675 of 820

Q. Program code making use of a given module is called a              of the module.

a. client

b. docstring

c. interface

d. modularity

  • a. client

Q. Which of the following is true about top- down design process?

a. the details of a program design are addressed before the overall design

b. only the details of the program are addressed

c. the overall design of the program is addressed before the details

d. only the design of the program is addressed

  • c. the overall design of the program is addressed before the details

Q. Which of the following is not a valid namespace?

a. global namespace

b. public namespace

c. built-in namespace

d. local namespace

  • b. public namespace

Q. Which of the following is false about “import modulename” form of import?

a. the namespace of imported module becomes part of importing module

b. this form of import prevents name clash

c. the namespace of imported module becomes available to importing module

d. the identifiers in module are accessed as: modulename.identifier

  • a. the namespace of imported module becomes part of importing module

Q. Which of the following is false about “from-import” form of import?

a. the syntax is: from modulename import identifier

b. this form of import prevents name clash

c. the namespace of imported module becomes part of importing module

d. the identifiers in module are accessed directly as: identifier

  • b. this form of import prevents name clash

Q. Which of the statements about modules is false?

a. in the “from-import” form of import, identifiers beginning with two underscores are private and aren’t imported

b. dir() built-in function monitors the items in the namespace of the main module

c. in the “from-import” form of import, all identifiers regardless of whether they are private or public are imported

d. when a module is loaded, a compiled version of the module with file extension .pyc is automatically produced

  • c. in the “from-import” form of import, all identifiers regardless of whether they are private or public are imported

Q. What is the order of namespaces in which Python looks for an identifier?

a. python first searches the global namespace, then the local namespace and finally the built- in namespace

b. python first searches the local namespace, then the global namespace and finally the built-in namespace

c. python first searches the built-in namespace, then the global namespace and finally the local namespace

d. python first searches the built-in namespace, then the local namespace and finally the global namespace

  • b. python first searches the local namespace, then the global namespace and finally the built-in namespace

Q. + 3 % 5

a. 4

b. 7

Q. 55+2/2)

a. 43

b. 44

c. 22

d. 23

  • b. 44

Q. +4.00, 2**4.0

a. (6.0, 16.0)

b. (6.00, 16.00)

c. (6, 16)

d. (6.00, 16.0)

  • a. (6.0, 16.0)
Subscribe Now

Get All Updates & News