๐Ÿ“ Python Project Structure ยท EXA-19

Structure โ†’ Module Path โ†’ Generated Import

Build the Project Before Writing the App

Drag files into the correct folders. The lab will translate the structure into Python import statements.

FILES

Drag each file to its correct location.

main.py
calculator.py
grade.py
__init__.py
PROJECT
my_app/
ROOT
utils/
STRUCTURE โ†’ IMPORT
my_app/
โ”œโ”€โ”€ main.py
โ””โ”€โ”€ utils/
    โ”œโ”€โ”€ __init__.py
    โ”œโ”€โ”€ calculator.py
    โ””โ”€โ”€ grade.py
GENERATED CODE
Complete Tab 1 first.

The dotted path follows folders: utils.calculator.

CHALLENGE

If tax.py is added inside utils/, write an import that gives it alias tx.

INSTRUCTOR SOLUTION

Password protected