pytudes/README.md
2020-04-14 10:57:30 -07:00

115 lines
30 KiB
Markdown

# pytudes
"An *étude* (a French word meaning *study*) is an instrumental musical composition, usually short, of considerable difficulty, and designed to provide practice material for perfecting a particular musical skill." — [Wikipedia](https://en.wikipedia.org/wiki/%C3%89tude)
This project contains **pytudes**—Python programs, usually short, for perfecting programming skills.
Some programs are in Jupyter (`.ipynb`) notebooks, some in `.py` files. For each notebook you can click on:
- [CO](https://colab.research.google.com) to **run** the file on Colab
- [DN](https://deepnote.com) to **run** the notebook on DeepNote
- [MY](https://mybinder.org) to **run** the notebook on MyBinder
- [NB](https://nbviewer.jupyter.org/) to **view** the notebook on NBViewer
- **The title** to **view** the notebook on github, and **download** or **fork** it.
# Index of Jupyter (IPython) Notebooks
|Run|Programming Examples|
|---|--|
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Advent-2018.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FAdvent-2018.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Advent-2018.ipynb) | [Advent of Code 2018](/blob/master/ipynb/Advent-2018.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Advent%202017.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FAdvent%202017.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Advent%202017.ipynb) | [Advent of Code 2017](/blob/master/ipynb/Advent%202017.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Advent%20of%20Code.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FAdvent%20of%20Code.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Advent%20of%20Code.ipynb) | [Advent of Code 2016](/blob/master/ipynb/Advent%20of%20Code.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Project%20Euler%20Utils.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FProject%20Euler%20Utils.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Project%20Euler%20Utils.ipynb) | [Project Euler Utilities](/blob/master/ipynb/Project%20Euler%20Utils.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/PropositionalLogic.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FPropositionalLogic.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/PropositionalLogic.ipynb) | [Translating English Sentences into Propositional Logic Statements](/blob/master/ipynb/PropositionalLogic.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Beal.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FBeal.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Beal.ipynb) | [Beal's Conjecture Revisited](/blob/master/ipynb/Beal.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/WWW.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FWWW.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/WWW.ipynb) | [WWW: Who Will Win (NBA Title)?](/blob/master/ipynb/WWW.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Pickleball.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FPickleball.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Pickleball.ipynb) | [Pickleball Tournament](/blob/master/ipynb/Pickleball.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Dice%20Baseball.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FDice%20Baseball.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Dice%20Baseball.ipynb) | [Dice Baseball](/blob/master/ipynb/Dice%20Baseball.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Life.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FLife.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Life.ipynb) | [Conway's Game of Life](/blob/master/ipynb/Life.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Sierpinski.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FSierpinski.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Sierpinski.ipynb) | [A Chaos Game with Triangles](/blob/master/ipynb/Sierpinski.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Maze.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FMaze.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Maze.ipynb) | [Generating Mazes](/blob/master/ipynb/Maze.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/TwelveBalls.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FTwelveBalls.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/TwelveBalls.ipynb) | [Weighing Twelve Balls](/blob/master/ipynb/TwelveBalls.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Cant-Stop.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FCant-Stop.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Cant-Stop.ipynb) | [Can't Stop](/blob/master/ipynb/Cant-Stop.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Bike%20Speed%20versus%20Grade.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FBike%20Speed%20versus%20Grade.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Bike%20Speed%20versus%20Grade.ipynb) | [Bike Speed Versus Grade](/blob/master/ipynb/Bike%20Speed%20versus%20Grade.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Orderable%20Cards.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FOrderable%20Cards.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Orderable%20Cards.ipynb) | [Properly Ordered Card Hands](/blob/master/ipynb/Orderable%20Cards.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Electoral%20Votes.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FElectoral%20Votes.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Electoral%20Votes.ipynb) | [Tracking Trump: Electoral Votes](/blob/master/ipynb/Electoral%20Votes.ipynb) |
|Logic and Number Puzzles|
|---|
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Cheryl.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FCheryl.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Cheryl.ipynb) | [When is Cheryl's Birthday?](/blob/master/ipynb/Cheryl.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Cheryl-and-Eve.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FCheryl-and-Eve.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Cheryl-and-Eve.ipynb) | [When Cheryl Met Eve: A Birthday Story](/blob/master/ipynb/Cheryl-and-Eve.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/RiddlerLottery.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FRiddlerLottery.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/RiddlerLottery.ipynb) | [Riddler Lottery](/blob/master/ipynb/RiddlerLottery.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/NightKing.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FNightKing.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/NightKing.ipynb) | [How Many Soldiers Do You Need to Beat the Night King?](/blob/master/ipynb/NightKing.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Coin%20Flip.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FCoin%20Flip.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Coin%20Flip.ipynb) | [The Devil and the Coin Flip Game](/blob/master/ipynb/Coin%20Flip.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Mean%20Misanthrope%20Density.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FMean%20Misanthrope%20Density.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Mean%20Misanthrope%20Density.ipynb) | [The Puzzle of the Misanthropic Neighbors](/blob/master/ipynb/Mean%20Misanthrope%20Density.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Countdown.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FCountdown.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Countdown.ipynb) | [Four 4s, Five 5s, and Countdown to 2016](/blob/master/ipynb/Countdown.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Sicherman%20Dice.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FSicherman%20Dice.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Sicherman%20Dice.ipynb) | [Sicherman Dice](/blob/master/ipynb/Sicherman%20Dice.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Golomb-Puzzle.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FGolomb-Puzzle.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Golomb-Puzzle.ipynb) | [Sol Golomb's Rectangle Puzzle](/blob/master/ipynb/Golomb-Puzzle.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Cryptarithmetic.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FCryptarithmetic.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Cryptarithmetic.ipynb) | [Cryptarithmetic](/blob/master/ipynb/Cryptarithmetic.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Riddler%20Battle%20Royale.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FRiddler%20Battle%20Royale.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Riddler%20Battle%20Royale.ipynb) | [The Riddler: Battle Royale](/blob/master/ipynb/Riddler%20Battle%20Royale.ipynb) |
|Run|Word Games|
|---|--|
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/SpellingBee.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FSpellingBee.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/SpellingBee.ipynb) | [Spelling Bee](/blob/master/ipynb/SpellingBee.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/ElementSpelling.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FElementSpelling.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/ElementSpelling.ipynb) | [Chemical Element Spelling](/blob/master/ipynb/ElementSpelling.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Boggle.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FBoggle.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Boggle.ipynb) | [Boggle / Inverse Boggle](/blob/master/ipynb/Boggle.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Portmantout.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FPortmantout.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Portmantout.ipynb) | [Portmantout Words](/blob/master/ipynb/Portmantout.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/xkcd-Name-Dominoes.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2Fxkcd-Name-Dominoes.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/xkcd-Name-Dominoes.ipynb) | [xkcd 1970: Name Dominoes](/blob/master/ipynb/xkcd-Name-Dominoes.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Ghost.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FGhost.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Ghost.ipynb) | [Ghost](/blob/master/ipynb/Ghost.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/pal3.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2Fpal3.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/pal3.ipynb) | [World's Longest Palindrome](/blob/master/ipynb/pal3.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Scrabble.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FScrabble.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Scrabble.ipynb) | [Refactoring a Crossword Game Program](/blob/master/ipynb/Scrabble.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/xkcd1313.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2Fxkcd1313.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/xkcd1313.ipynb) | [xkcd 1313: Regex Golf](/blob/master/ipynb/xkcd1313.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/xkcd1313-part2.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2Fxkcd1313-part2.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/xkcd1313-part2.ipynb) | [xkcd 1313: Regex Golf (Part 2: Infinite Problems)](/blob/master/ipynb/xkcd1313-part2.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Fred%20Buns.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FFred%20Buns.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Fred%20Buns.ipynb) | [Let's Code About Bike Locks](/blob/master/ipynb/Fred%20Buns.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Gesture%20Typing.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FGesture%20Typing.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Gesture%20Typing.ipynb) | [Gesture Typing](/blob/master/ipynb/Gesture%20Typing.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/How%20to%20Do%20Things%20with%20Words.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FHow%20to%20Do%20Things%20with%20Words.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/How%20to%20Do%20Things%20with%20Words.ipynb) | [How to Do Things with Words, or Statistical Natural Language Processing in Python](/blob/master/ipynb/How%20to%20Do%20Things%20with%20Words.ipynb) |
|Run|Math Concepts|
|--|--|
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Probability.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FProbability.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Probability.ipynb) | [A Concrete Introduction to Probability](/blob/master/ipynb/Probability.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/ProbabilityParadox.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FProbabilityParadox.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/ProbabilityParadox.ipynb) | [Probability, Paradox, and the Reasonable Person Principle](/blob/master/ipynb/ProbabilityParadox.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/ProbabilitySimulation.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FProbabilitySimulation.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/ProbabilitySimulation.ipynb) | [Estimating Probabilities with Simulations](/blob/master/ipynb/ProbabilitySimulation.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Differentiation.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FDifferentiation.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Differentiation.ipynb) | [Symbolic Algebra, Simplification, and Differentiation](/blob/master/ipynb/Differentiation.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Economics.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FEconomics.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Economics.ipynb) | [Economics Simulation](/blob/master/ipynb/Economics.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/How%20To%20Count%20Things.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FHow%20To%20Count%20Things.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/How%20To%20Count%20Things.ipynb) | [How to Count Things](/blob/master/ipynb/How%20To%20Count%20Things.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Socks.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FSocks.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Socks.ipynb) | [Pairing Socks](/blob/master/ipynb/Socks.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Euler's%20Conjecture.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FEuler's%20Conjecture.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Euler's%20Conjecture.ipynb) | [Euler's Sum of Powers Conjecture](/blob/master/ipynb/Euler's%20Conjecture.ipynb) |
|Run|Computer Science Algorithms and Concepts|
|--|--|
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Convex%20Hull.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FConvex%20Hull.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Convex%20Hull.ipynb) | [The Convex Hull Problem](/blob/master/ipynb/Convex%20Hull.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/TSP.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FTSP.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/TSP.ipynb) | [The Traveling Salesperson Problem](/blob/master/ipynb/TSP.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/StableMatching.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FStableMatching.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/StableMatching.ipynb) | [The Stable Matching Problem](/blob/master/ipynb/StableMatching.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/BASIC.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FBASIC.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/BASIC.ipynb) | [BASIC Interpreter](/blob/master/ipynb/BASIC.ipynb) |
| [CO](https://colab.research.google.com/github/googlecolab/colabtools//blob/master/ipynb/Snobol.ipynb) [DN](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2F%2Fblob%2Fmaster%2Fipynb%2FSnobol.ipynb) [MY](https://mybinder.org/v2/gh/norvig/pytudes/master) [NB](https://nbviewer.jupyter.org/github/norvig/pytudes//blob/master/ipynb/Snobol.ipynb) | [Bad Grade, Good Experience](/blob/master/ipynb/Snobol.ipynb) |
# Index of Python Files
| **File** | **Description** | **Documentation**|
|:--------|:-------------------|----|
|[SET.py](/blob/master/py/SET.py)|*Analyze the card game SET*|[documentation](http://norvig.com/SET.html)|
|[beal.py](/blob/master/py/beal.py)|*Search for counterexamples to Beal's Conjecture*|[documentation](http://norvig.com/beal.html)|
|[docex.py](/blob/master/py/docex.py)|*A framework for running unit tests, similar to `doctest`*||
|[ibol.py](/blob/master/py/ibol.py)|*An Exercise in Species Barcoding*|[documentation](http://norvig.com/ibol.html)|
|[lettercount.py](/blob/master/py/lettercount.py)|*Convert Google Ngram Counts to Letter Counts*|[documentation](http://norvig.com/mayzner.html)|
|[lis.py](/blob/master/py/lis.py)|*Lisp Interpreter written in Python*|[documentation](http://norvig.com/lispy.html)|
|[lispy.py](/blob/master/py/lispy.py)|*Even Better Lisp Interpreter written in Python*|[documentation](http://norvig.com/lispy2.html)|
|[lispytest.py](/blob/master/py/lispytest.py)|*Tests for Lisp Interpreters*||
|[pal.py](/blob/master/py/pal.py)|*Find long palindromes*|[documentation](http://norvig.com/palindrome.html)|
|[pal2.py](/blob/master/py/pal2.py)|*Find longer palindromes*|[documentation](http://norvig.com/palindrome.html)|
|[pal3.py](/blob/master/py/pal3.py)|*Find even longer palindromes*|[documentation](http://norvig.com/palindrome.html)|
|[py2html.py](/blob/master/py/py2html.py)|*Pretty-printer to format Python files as html*||
|[spell.py](/blob/master/py/spell.py)|*Spelling corrector*|[documentation](http://norvig.com/spell-correct.html)|
|[sudoku.py](/blob/master/py/sudoku.py)|*Program to solve sudoku puzzles*|[documentation](http://norvig.com/sudoku.html)|
|[testaccum.py](/blob/master/py/testaccum.py)|*Tests for my failed Python `accumulation display` proposal*|[documentation](http://norvig.com/pyacc.html)|
|[yaptu.py](/blob/master/py/yaptu.py)|*Yet Another Python Templating Utility*||
# Etudes for Programmers
I got the idea for the *"etudes"* part of the name from
this [1978 book](https://books.google.com/books/about/Etudes_for_programmers.html?id=u89WAAAAMAAJ)
by [Charles Wetherell](http://demin.ws/blog/english/2012/08/25/interview-with-charles-wetherell)
that was very influential to me when I was first learning to program.
![](https://images-na.ssl-images-amazon.com/images/I/51ZnZH29dvL._SX394_BO1,204,203,200_.jpg)