ComeçarComece de graça

Importing from parents

In this exercise, you will be importing a function from the utils.py module at the top of your package. A utils module is usually used for small, often unrelated, pieces of code each of which which aren't enough to justify their own module.

You'll import a function for checking the units passed to the convert_units() function. You'll use this checking function in another subpackage later. That's why we don't just put this function in one of the modules in the length subpackage.

Remember that you can open/close the folder and files overview by clicking on the icon on the left side of the editor highlighted in red. Icon with multiple files

Este exercício faz parte do curso

Developing Python Packages

Ver curso

Exercício interativo prático

Transforme a teoria em ação com um de nossos exercícios interativos

Começar o exercício