Certified Associate in Python Programming (PCAP-31-03) — Question 88

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

Answer options

Correct answer: B, D

Explanation

Option B is correct because a package in Python is indeed a collection of related modules that are organized in a directory. Option D is also correct as the .pyc extension is used for compiled Python files, which can be considered semi-compiled packages. Options A and C are incorrect; a package is not a single file ending with the .pa extension, and the __name__ variable does not always contain the name of a package.