Practice
Exercise library
All 811 graded exercises. Each opens in its lesson, where the examples that teach it are right above.
811 exercises · page 10 of 14
- A generic cheapest() for anything pricedTrack 12 · Type hints in depthChallenge · ●●●●Members
- Hints don't validate: check the input yourselfTrack 12 · Type hints in depthEdge cases · ●●●Members
- An order status enumTrack 12 · Enums and structural pattern matchingGuided · ●●Members
- Read support-ticket priorities safelyTrack 12 · Enums and structural pattern matchingChallenge · ●●●Members
- Postage with class patternsTrack 12 · Enums and structural pattern matchingChallenge · ●●●●Members
- Fix the shop bannerTrack 12 · Enums and structural pattern matchingDebugging · ●●●Members
- Rank the top sellersTrack 12 · Functional toolsGuided · ●●Members
- Invoice lines that must line upTrack 12 · Functional toolsChallenge · ●●●Members
- Compose price adjustments with reduceTrack 12 · Functional toolsChallenge · ●●●●Members
- An empty order is not ready to shipTrack 12 · Functional toolsEdge cases · ●●●Members
- Your first coroutineTrack 12 · asyncio basicsGuided · ●●Members
- Total an order with awaited lookupsTrack 12 · asyncio basicsChallenge · ●●●Members
- Errors travel through awaitTrack 12 · asyncio basicsEdge cases · ●●●Members
- Fix the stock checker that approves everythingTrack 12 · asyncio basicsDebugging · ●●●Members
- Fetch all prices concurrentlyTrack 12 · asyncio concurrencyGuided · ●●●Members
- Collect quotes, skipping slow suppliersTrack 12 · asyncio concurrencyChallenge · ●●●●Members
- One bad supplier crashes the reportTrack 12 · asyncio concurrencyDebugging · ●●●Members
- Milestone 1: run one jobTrack 12 · asyncio concurrencyProject milestone · ●●●Members
- Milestone 2: run a batch with a TaskGroupTrack 12 · asyncio concurrencyProject milestone · ●●●●Members
- Milestone 3: limit concurrency with workersTrack 12 · asyncio concurrencyProject milestone · ●●●●●Members
- Milestone 4: survive failures and timeoutsTrack 12 · asyncio concurrencyProject milestone · ●●●●●Members
- Tests that tell right from wrongTrack 13 · Why we testWriting tests · ●●
- Make the team's checks passTrack 13 · Why we testDebugging · ●●
- Keep a fixed bug fixedTrack 13 · Why we testEdge cases · ●●
- Test an invoice number formatterTrack 13 · Writing tests with assertGuided · ●●Members
- Tests for a shopping basketTrack 13 · Writing tests with assertChallenge · ●●●Members
- Fix tests that can never failTrack 13 · Writing tests with assertDebugging · ●●Members
- Make pytest find every testTrack 13 · Testing with pytestDebugging · ●●Members
- Test a duration parserTrack 13 · Testing with pytestWriting tests · ●●●Members
- Fix the code from pytest's reportTrack 13 · Testing with pytestDebugging · ●●Members
- Test a withdrawal that can refuseTrack 13 · Testing exceptions and floatsGuided · ●●Members
- Test a sensor averageTrack 13 · Testing exceptions and floatsChallenge · ●●●Members
- Fix float tests that fail on correct codeTrack 13 · Testing exceptions and floatsDebugging · ●●Members
- Tell error reasons apart with matchTrack 13 · Testing exceptions and floatsEdge cases · ●●●Members
- Edge-case tests for initialsTrack 13 · Thinking in edge casesGuided · ●●Members
- Make chunk() survive its edge casesTrack 13 · Thinking in edge casesEdge cases · ●●●Members
- Boundary tests for shipping feesTrack 13 · Thinking in edge casesWriting tests · ●●●Members
- Turn copy-pasted tests into a tableTrack 13 · Table-driven tests with parametrizeRefactoring · ●●Members
- A table for ticket pricesTrack 13 · Table-driven tests with parametrizeWriting tests · ●●●Members
- Repair a broken test tableTrack 13 · Table-driven tests with parametrizeDebugging · ●●●Members
- Isolate the gradebook testsTrack 13 · Fixtures, setup and test isolationDebugging · ●●●Members
- Test a CSV loader with tmp_pathTrack 13 · Fixtures, setup and test isolationWriting tests · ●●●Members
- A sample-file fixture for log toolsTrack 13 · Fixtures, setup and test isolationWriting tests · ●●●●Members
- Make the red tests greenTrack 13 · Test-driven developmentGuided · ●●Members
- Test-first: a time parserTrack 13 · Test-driven developmentChallenge · ●●●●Members
- Add a feature test-firstTrack 13 · Test-driven developmentEdge cases · ●●●Members
- Extract a duplicated calculationTrack 13 · Refactoring safelyRefactoring · ●●Members
- Replace a conditional chain with a lookupTrack 13 · Refactoring safelyRefactoring · ●●●Members
- Characterization tests for legacy codeTrack 13 · Refactoring safelyWriting tests · ●●●●Members
- Name the magic numbersTrack 13 · Readable codeGuided · ●●Members
- Rename and document a cryptic functionTrack 13 · Readable codeRefactoring · ●●Members
- Split a function that does everythingTrack 13 · Readable codeRefactoring · ●●●Members
- Annotate a functionTrack 13 · Type hints and static checksGuided · ●●Members
- Fix the bug mypy reportedTrack 13 · Type hints and static checksDebugging · ●●●Members
- Write fully typed functionsTrack 13 · Type hints and static checksChallenge · ●●●Members
- Milestone 1: reproduce, then fixTrack 13 · Debugging with tests: a pricing moduleDebugging · ●●●Members
- Milestone 2: test the discount codesTrack 13 · Debugging with tests: a pricing moduleWriting tests · ●●●Members
- Milestone 3: tables for shipping and line totalsTrack 13 · Debugging with tests: a pricing moduleWriting tests · ●●●Members
- Milestone 4: VAT charged on shippingTrack 13 · Debugging with tests: a pricing moduleDebugging · ●●●●Members
- Milestone 5: a test suite for order_totalTrack 13 · Debugging with tests: a pricing moduleProject milestone · ●●●●Members