Certified Associate in Python Programming (PCAP) — Question 128

What is true about Python packages? (Choose two.)

Answer options

Correct answer: B, D

Explanation

Option B is correct because a package indeed consists of a collection of related modules. Option D is also correct as the .pyc extension is used for compiled Python files. Option A is incorrect since a package is not defined by a specific file extension like 'pa', and option C is misleading because the __name__ variable indicates the name of a module or package, but it does not always represent a package's name.