gitwtfhub

wtf is pytudes?

norvig/pytudes — explained in plain English

Analysis updated 2026-06-21

24,325Jupyter NotebookAudience · developerComplexity · 2/5Setup · easy

TL;DR

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.

Mindmap

mindmap
  root((pytudes))
    What it is
      Python exercises
      Expert solutions
      Interactive notebooks
    Topic Areas
      Math puzzles
      AI problems
      Advent of Code
      Word and logic games
    Format
      Jupyter Notebooks
      Runnable in browser
      Code plus explanation
    Audience
      Intermediate Python
      Advanced learners
      AI researchers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Study expert-level Python problem-solving by reading and running Norvig's annotated solutions to classic puzzles.

REASON 2

Use a specific notebook as a reference when tackling a similar math, logic, or probability problem in your own code.

REASON 3

Practice advanced Python by running Advent of Code solutions and adapting them to different inputs.

REASON 4

Explore how an AI researcher approaches language model and probability problems with concise, elegant Python.

What's in the stack?

PythonJupyter Notebook

How it stacks up

norvig/pytudestrekhleb/homemade-machine-learningwesm/pydata-book
Stars24,32524,51624,540
LanguageJupyter NotebookJupyter NotebookJupyter Notebook
Setup difficultyeasyeasyeasy
Complexity2/52/52/5
Audiencedeveloperdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Notebooks run in-browser via Google Colab, no local installation required.

License not mentioned in the explanation.

Wtf does this do

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.

Yoink these prompts

Prompt 1
I'm reading Peter Norvig's pytudes notebook on Advent of Code. Explain the algorithmic approach he uses and help me adapt it to solve a similar grid-traversal puzzle with different rules.
Prompt 2
Using the pytudes coding style, help me write a concise Python solution to the classic eight-queens problem that fits in under 10 lines.
Prompt 3
Analyze this pytude code snippet and explain the key Python techniques Norvig uses to keep the solution short and readable.
Prompt 4
Help me extend one of the pytudes probability simulation notebooks to model a different game of chance using the same clean functional Python style.

Frequently asked questions

wtf is pytudes?

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.

What language is pytudes written in?

Mainly Jupyter Notebook. The stack also includes Python, Jupyter Notebook.

What license does pytudes use?

License not mentioned in the explanation.

How hard is pytudes to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is pytudes for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.