exam questions

Exam PCAP-31-03 All Questions

View all questions & answers for the PCAP-31-03 exam

Exam PCAP-31-03 topic 1 question 71 discussion

Actual exam question from Python Institute's PCAP-31-03
Question #: 71
Topic #: 1
[All PCAP-31-03 Questions]

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

  • A. a package is a single file whose name ends with the pa extension
  • B. a package is a group of related modules
  • C. the __name__ variable always contains the name of a package
  • D. the pyc extension is used to mark semi-compiled Python packages
Show Suggested Answer Hide Answer
Suggested Answer: BD 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Abbribas
1 month, 2 weeks ago
Selected Answer: BD
A. ❌ False – A package is not a single file and .pa is not a valid Python extension. B. ✅ True – A package is a directory containing a group of related modules (.py files), usually with an __init__.py file. C. ❌ False – The __name__ variable refers to the module name, not specifically the package. In scripts, it can be '__main__'. D. ✅ True – .pyc files are compiled bytecode versions of Python source files, often found in packages (under __pycache__).
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...