PCAP Exam QuestionsBrowse all questions from this exam

PCAP Exam - Question 79


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

Show Answer
Correct Answer: BD

A package in Python is indeed a group of related modules, which means that option B is correct. Python packages are not single files ending with the .pa extension, so option A is incorrect. The __name__ variable typically contains the name of a module, not a package, making option C incorrect. The .pyc extension is used to mark compiled Python files (not semi-compiled), which can be considered as semi-compiled in the sense that they are not source files but byte-compiled files. Therefore, option D is correct.

Discussion

5 comments
Sign in to comment
agus007Options: BD
Nov 15, 2022

BD are correct. __name__ variable contains the name of a module, not of a package

NengggOptions: BD
Dec 11, 2022

B. a package is a group of related modules D. the pyc extension is used to mark semi-compiled Python packages

rotimislawOptions: BC
Nov 14, 2022

BC is the correct answer The rest is wrong because: A: Packages doesn't need to end with a *.pa suffix D: *.pyc are compiled already, not pre-compiled

mplopezOptions: BD
Aug 24, 2023

The B is correct because a Package is s a group of related modules, and D it's a semi-compiled python packages.

jaimebbOptions: BD
Jul 11, 2023

BD are correct