Python ยท Practice
Python exercises
9 exercises: 5 easy, 4 medium and 0 hard. Each has a starter file, examples, hints and a solution you can reveal, and your program is checked against every test case. Everything runs in your browser.
- Choose a delivery windowEasy
Classify a parcel into a delivery window with clear Python if, elif and else conditions.
ConditionsNot started
- Dispatch message initialsEasy
Create uppercase initials from a multi-word dispatch message using Python string operations.
StringsNot started
- Market basket totalEasy
Read item prices and quantities, then print the basket total with two decimal places using Python arithmetic.
BasicsNot started
- Parcel cost functionEasy
Write and call a Python function that calculates a parcel charge from weight and distance bands.
FunctionsNot started
- Unique route stopsEasy
Remove repeated bus stops while preserving first-seen order with Python lists and membership checks.
ListsNot started
- Inventory movement tallyMedium
Aggregate stock movements by product and print a sorted Python dictionary report.
DictionariesNot started
- Longest reading streakMedium
Find the longest run of reading days from a compact activity string using a Python loop.
LoopsNot started
- Safe reading averageMedium
Parse sensor tokens safely in Python and average only valid numeric readings using exception handling.
ExceptionsNot started
- Word frequency reportMedium
Count repeated words with a Python dictionary and print a deterministic alphabetical frequency report.
DictionariesNot started