explaingit

norvig/pytudes

📈 Trending24,326Jupyter NotebookAudience · developerComplexity · 2/5ActiveLicenseSetup · easy

TLDR

A collection of Python programming exercises and puzzle solutions by Peter Norvig, presented as interactive Jupyter Notebooks. Learn elegant problem-solving techniques through self-contained challenges.

Mindmap

mindmap
  root((pytudes))
    What it does
      Puzzle solutions
      Programming exercises
      Interactive notebooks
    Topics covered
      Math puzzles
      Logic problems
      Advent of Code
      AI exploration
    How to use
      Run in browser
      Study code style
      Practice techniques
    Audience
      Intermediate coders
      Advanced learners
      Puzzle enthusiasts

Things people build with this

USE CASE 1

Study how an expert solves Project Euler problems and Advent of Code challenges with clean, concise Python.

USE CASE 2

Learn elegant problem-solving patterns by reading through self-contained notebook solutions you can run in your browser.

USE CASE 3

Practice specific programming techniques like probability simulations, word games, and mathematical algorithms.

USE CASE 4

Improve your coding craft by analyzing how Peter Norvig approaches hard puzzles with minimal, readable code.

Tech stack

Python 3Jupyter Notebook

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

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.

Copy-paste prompts

Prompt 1
Show me how to solve this Advent of Code problem in Python like Peter Norvig would, clean, concise, no unnecessary complexity.
Prompt 2
I want to understand the elegant approach to solving Project Euler problems. Walk me through one of the pytudes notebooks step by step.
Prompt 3
How would you write a Python solution for a logic puzzle that's both readable and efficient? Show me an example from pytudes.
Prompt 4
I'm trying to improve my Python problem-solving skills. What techniques does Peter Norvig use in his pytudes notebooks that I should learn?
Prompt 5
Can you help me adapt one of the pytudes solutions to solve a similar but different puzzle I'm working on?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.