Courses
Python Intermediate: Write Code You Won't Be Embarrassed to Share
Check Yourself: Prove It Works Before Someone Else Finds Out
Five scenario questions on pytest, logging and pdb. If you miss more than one, reread the lesson before the final check.
Course content
Join this Course
Sign in to save your progress.
-
Set Up Projects That Don't Break Each Other
-
Python Virtual Environments and pip: One Project, One Environment
-
Pinning Python Dependencies With requirements.txt
-
-
-
Organize Code Other People Can Read
-
Python Modules and Packages: Splitting One Big File
-
Python Imports: Why ModuleNotFoundError Keeps Happening
-
Python Classes: When a Dictionary Is No Longer Enough
-
-
-
Work With Real Files
-
Python File Handling: Open, Read, Write, and Always Use with
-
Python pathlib: Stop Building File Paths by Hand
-
Reading, Cleaning and Writing CSV Data in Python
-
-
-
Shorter Code That Still Says What It Does
-
Python Comprehensions: Lists, Sets and Dictionaries
-
When a Comprehension Should Be a Plain Loop
-
-
-
Prove It Works Before Someone Else Finds Out
-
Python Testing Basics With pytest
-
Debugging Python With print, logging and pdb
-
-
- Final Check: Python Intermediate
1.
A test fails after a teammate's change: shipping_fee(1000) returns 150, but the test expects 0. What do you do first?
2.
Which test is most likely to catch an off-by-one bug in a "free shipping from 1,000" rule?
3.
A script runs every night on a server, and sometimes produces a wrong total. Nobody is watching when it runs. Which tool fits?
4.
You want to check that apply_discount(1000, 150) refuses the bad percent. How do you test that with pytest?
5.
You are about to commit a fix. Your code still contains breakpoint() from debugging. What is the risk?
About
Five scenario questions on pytest, logging and pdb. If you miss more than one, reread the lesson before the final check.
- Duration
- 5 min
- Last update
- 09/09/2026
Was this helpful?
0
0
Comments (0)
Sign in to commentNo comments yet.