gitmyhub

pytudes

Jupyter Notebook ★ 24k updated 3d ago

Python programs, usually short, of considerable difficulty, to perfect particular skills.

Pytudes is Peter Norvig's personal collection of Python programming exercises in Jupyter Notebooks, covering math puzzles, AI problems, and coding challenges written to demonstrate expert-level Python craft.

PythonJupyter Notebooksetup: easycomplexity 2/5

Pytudes is a personal collection of Python programming exercises created by Peter Norvig, a renowned AI researcher and former Google research director. The name is a play on "etude" — a French word for a musical study piece designed to develop technique — applied to programming. Just as a pianist practices etudes to sharpen specific skills, these are Python programs written to practice and demonstrate programming craft.

The collection is primarily Jupyter Notebooks, which are interactive documents that combine code, explanations, and results all in one readable file. Each notebook tackles a self-contained problem: some are mathematical puzzles (like Project Euler challenges), some are logic problems, some explore AI and language model behavior, and many are solved puzzles from Advent of Code (an annual programming challenge event in December). Topics range from prime number theory to word games to probability simulations.

This is not a tutorial for beginners. As the author notes, it's for people who think of programming like playing an instrument — a craft requiring years of deliberate practice. Intermediate to advanced Python programmers would use this as a source of inspiration, as a study in elegant problem-solving, or to see how an expert approaches hard puzzles with clean, concise Python code. The notebooks are runnable in the browser via platforms like Google Colab, requiring no local setup. The language is Python 3.

Where it fits