Exam PCAP All QuestionsBrowse all questions from this exam
Question 79

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

    Correct Answer: B, D

    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
agus007Options: BD

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

NengggOptions: BD

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

rotimislawOptions: BC

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

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

BD are correct