Study how an expert solves Project Euler problems and Advent of Code challenges with clean, concise Python.
Learn elegant problem-solving patterns by reading through self-contained notebook solutions you can run in your browser.
Practice specific programming techniques like probability simulations, word games, and mathematical algorithms.
Improve your coding craft by analyzing how Peter Norvig approaches hard puzzles with minimal, readable code.
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.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.