Locate the cause of an import-related error

A packing application can successfully import a local file named supplies.py, which contains only this assignment:


Python
BOX_SIZE = 24


No module named missing_supplies is available. Each snippet below runs separately in a fresh Python interpreter. Enter the exception class raised by each snippet: ModuleNotFoundError, ImportError, or AttributeError.


Snippet A


Python
import missing_supplies


Snippet B


Python
from supplies import CASE_SIZE


Snippet C


Python
import supplies
print(supplies.CASE_SIZE)
SnippetException class
A
B
C

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Modules and import Questions: