PCAP-31-03 Exam QuestionsBrowse all questions from this exam

PCAP-31-03 Exam - Question 5


With regards to the directory structure below, select the proper forms of the directives in order to import module_c. (Choose two.)

Show Answer
Correct Answer: AB

The correct forms of the directives to import module_c file considering the directory structure are: 'from pypack.upper.lower import module_c' and 'import pypack.upper.lower.module_c'. These correctly reference the full path of the module. The other options are incorrect because they either omit necessary parts of the path or do not start from the root package.

Discussion

3 comments
Sign in to comment
herrmann69Options: AB
Jun 4, 2024

A and B are correct. from pypack.upper.lower import module_c import import pypack.upper.lower.module_c C is missing "lower" between "upper" and "module_c" D is missing "pypack" as the parent of "upper"

DKAT2023Options: AB
Jun 28, 2024

A and B

Dave304409Options: AB
Jul 4, 2024

is correct