PCAP Modules and Packages • Set 6
PCAP Modules and Packages Practice Test 6 — 15 questions with explanations. Free, no signup.
A package 'tools' has the structure: tools/__init__.py, tools/calc.py, tools/io.py. In __init__.py, the developer writes: from . import calc. A user tries: import tools; print(tools.add(1,2)). This fails with AttributeError. Why?
Choose an answer to begin — your selection is scored in the full session.
15 questions · instant feedback and full explanations after every question.