1. Interface
2. Modularity
3. Client
4. Docstring
Docstring
1. The details of a program design are addressed before the overall design
2. Only the details of the program are addressed
3. The overall design of the program is addressed before the details
4. Only the design of the program is addressed
The overall design of the program is addressed before the details
1. True
2. False
False
1. True
2. False
False
1. [2,4,6]
2. [1,4,9]
3. [2,4,6][1,4,9]
4. There is a name clash
There is a name clash
1. When a python file is directly executed, it is considered main module of a program
2. Main modules may import any number of modules
3. Special name given to main modules is: __main__
4. Other main modules can import main modules
Other main modules can import main modules
1. Global namespace
2. Public namespace
3. Built-in namespace
4. Local namespace
Public namespace
1. The namespace of imported module becomes part of importing module
2. This form of import prevents name clash
3. The namespace of imported module becomes available to importing module
4. The identifiers in module are accessed as: modulename.identifier
The namespace of imported module becomes part of importing module
1. The syntax is: from modulename import identifier
2. This form of import prevents name clash
3. The namespace of imported module becomes part of importing module
4. The identifiers in module are accessed directly as: identifier
This form of import prevents name clash
1. In the “from-import” form of import, identifiers beginning with two underscores are private and aren’t imported
2. dir() built-in function monitors the items in the namespace of the main module
3. In the “from-import” form of import, all identifiers regardless of whether they are private or public are imported
4. When a module is loaded, a compiled version of the module with file extension .pyc is automatically produced
In the “from-import” form of import, all identifiers regardless of whether they are private or public are imported