PCAP Modules and Packages • Set 5
PCAP Modules and Packages Practice Test 5 — 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?