Aan de slagGa gratis aan de slag

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

Deze oefening maakt deel uit van de cursus

Developing Python Packages

Cursus bekijken

Praktische interactieve oefening

Zet theorie om in actie met een van onze interactieve oefeningen.

Begin met trainen