Skip to Content
Python Intermediate: Write Code You Won't Be Embarrassed to Share
Intermediate
0 likes
Courses
Python Intermediate: Write Code You Won't Be Embarrassed to Share

Check Yourself: Organize Code Other People Can Read

Five scenario questions on modules, packages, imports and classes. If you miss more than one, go back to the lesson that covers it.

Course content

Sign in to save your progress.

Course Home
2. python tools/report.py fails with "No module named 'shop'", but shop/ is right there in the project folder. What is the cleanest fix?
4. Your code passes an order dictionary to ten functions, and several of them check the status rules slightly differently. What does moving to a class give you?
5. You wrote class Cart: def __init__(self, items=[]): and now every new cart already contains items from other carts. Why?

About

Five scenario questions on modules, packages, imports and classes. If you miss more than one, go back to the lesson that covers it.

Duration
5 min
Last update
09/17/2026
Was this helpful?
​ 0 ​ 0

Comments (0)

Sign in to comment

No comments yet.