Exam PCAP All QuestionsBrowse all questions from this exam
Question 129

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

    Correct Answer: A, B

    To import module_b correctly given the directory structure shown, you must include the full package path. The two correct forms are 'from pypack.upper import module_b' and 'import pypack.upper.module_b'. Both of these options specify the path from the top-level package (pypack) down to module_b, ensuring the import will work correctly in Python.

Discussion
macxszOption: A

A. from pyback.upper import module_b B. import pyback.upper.module_b

rotimislawOption: B

A. from pyback.upper import module_b B. import pyback.upper.module_b

seaverickOption: A

import pypack.upper.module_b #True #import upper.module_b #ModuleNotFoundError: No module named 'upper' from pypack.upper import module_b #import module_b #ModuleNotFoundError: No module named 'module_b' Ans -> AB

DezzoPalYeahOptions: AB

Answer is AB.

ivanbicalhoOptions: AB

It should be AB, the question is asking us to choose two, but the system is considering a solo answer wrongly.

NengggOption: A

A. from pyback.upper import module_b B. import pyback.upper.module_b