MulaiMulai sekarang secara gratis

Recognizing packages

The structure of your directory tree is printed below. You'll be working in the file my_script.py that you can see in the tree.

recognizing_packages
├── MY_PACKAGE
│   └── __init__.py
├── package
│   └── __init__.py
├── package_py
│   └── __init__
│       └── __init__.py
├── py_package
│   └── __init__.py
├── pyackage
│   └── init.py
└── my_script.py

Latihan ini adalah bagian dari kursus

Software Engineering Principles in Python

Lihat Kursus

Petunjuk latihan

  • Use the information from the context to identify the packages in the directory that follow the minimal structure.
  • import the two packages that follow the minimal package requirements.
  • Use help() to print information about each imported package.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Import local packages
import ____
import ____

# View the help for each package
help(____)
help(____)
Edit dan Jalankan Kode