Skip to content

Latest commit

 

History

History

exercises

README.md

🏋️ Follow-Along Exercises

Ten hands-on exercises to practise what you've learned from the script library. Each exercise has a starter file (exercise.py) with TODO markers guiding you step by step, and a solution file (solution.py) to check your work afterwards.

How to use these:

  1. Read the exercise.py file top to bottom — the comments explain everything.
  2. Fill in the TODO sections yourself, one at a time.
  3. Run your script frequently to test as you go: python exercise.py
  4. Only peek at solution.py when you're truly stuck or want to compare approaches.

Exercises

# Title Key Concepts Difficulty
01 File Extension Report pathlib, Counter, sorting ⭐ Beginner
02 Find Files by Pattern glob, fnmatch, generators ⭐ Beginner
03 Disk Space Alert psutil, thresholds, exit codes ⭐ Beginner
04 Process Watchdog psutil, loops, conditionals ⭐⭐ Intermediate
05 HTTP Health Checker urllib, status codes, timeouts ⭐⭐ Intermediate
06 Log Grepper re, os.walk, generators ⭐⭐ Intermediate
07 Uptime Logger csv, time.sleep, append mode ⭐⭐ Intermediate
08 Environment Inspector os.environ, filtering, sorting ⭐ Beginner
09 Directory Size Report os.walk, recursion, formatting ⭐⭐ Intermediate
10 System Health Snapshot json, combining modules, datetime ⭐⭐⭐ Advanced

Tips for Beginners

  • Don't panic at errors — read the last line of the traceback first. That's the actual problem.
  • Use print() everywhere while debugging. Remove them when it works.
  • Python docs: https://docs.python.org/3/library/
  • Look up any function: help(sorted) in the Python REPL gives you instant docs.
  • Google is allowed — real developers search constantly. The skill is knowing what to search for.