Practice - Creating Your Own Python Package (Basic)
Enroll to start learning
You’ve not yet enrolled in this course. Please enroll for free to listen to audio lessons, classroom podcasts and take practice test.
Practice Questions
Test your understanding with targeted questions
What file do you need to create in your package directory to indicate it is a package?
💡 Hint: It's a special file with double underscores.
Name a common reason for creating your own Python package.
💡 Hint: Think about multiple projects.
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What is the purpose of the __init__.py file?
💡 Hint: It's what makes your folder special!
True or False: A Python package can contain multiple modules.
💡 Hint: Think about how packages are structured!
1 more question available
Challenge Problems
Push your limits with advanced challenges
Design a Python package named 'Weather' that includes modules for temperature conversion and weather data retrieval. Write how you would structure this package.
💡 Hint: Think about what modules you would want in a weather package!
Create a function named divide in 'math_operations.py' to divide two numbers. Explain how to call this function from a script after defining your package.
💡 Hint: Remember to check for division by zero in your function!
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.