Ignoring existing ipynb checkpoint files
[cas-master-teacher-training.git] / .ipynb_checkpoints / hangman-guesser-checkpoint.ipynb
diff --git a/.ipynb_checkpoints/hangman-guesser-checkpoint.ipynb b/.ipynb_checkpoints/hangman-guesser-checkpoint.ipynb
deleted file mode 100644 (file)
index 1dd623b..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-{
- "metadata": {
-  "name": "",
-  "signature": "sha256:576842385a8db766a7dd158b6bf837c2e7ee16dd3fc6409d40e92cc57bfaacb3"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
-  {
-   "cells": [
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [
-      "import string\n",
-      "import collections"
-     ],
-     "language": "python",
-     "metadata": {},
-     "outputs": [],
-     "prompt_number": 1
-    },
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [
-      "letter_counts = collections.Counter(l.lower() for l in open('sherlock-holmes.txt').read() if l in string.ascii_letters)\n",
-      "letter_counts"
-     ],
-     "language": "python",
-     "metadata": {},
-     "outputs": [
-      {
-       "metadata": {},
-       "output_type": "pyout",
-       "prompt_number": 4,
-       "text": [
-        "Counter({'e': 53111, 't': 38981, 'a': 35137, 'o': 33512, 'i': 30140, 'h': 29047, 'n': 28682, 's': 27194, 'r': 24508, 'd': 18563, 'l': 17145, 'u': 13116, 'm': 11787, 'w': 11266, 'c': 10499, 'y': 9431, 'f': 8975, 'g': 7887, 'p': 6835, 'b': 6362, 'v': 4452, 'k': 3543, 'x': 549, 'j': 452, 'q': 426, 'z': 149})"
-       ]
-      }
-     ],
-     "prompt_number": 4
-    },
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [
-      "letters_in_order = [p[0] for p in letter_counts.most_common()]\n",
-      "letters_in_order"
-     ],
-     "language": "python",
-     "metadata": {},
-     "outputs": [
-      {
-       "metadata": {},
-       "output_type": "pyout",
-       "prompt_number": 9,
-       "text": [
-        "['e',\n",
-        " 't',\n",
-        " 'a',\n",
-        " 'o',\n",
-        " 'i',\n",
-        " 'h',\n",
-        " 'n',\n",
-        " 's',\n",
-        " 'r',\n",
-        " 'd',\n",
-        " 'l',\n",
-        " 'u',\n",
-        " 'm',\n",
-        " 'w',\n",
-        " 'c',\n",
-        " 'y',\n",
-        " 'f',\n",
-        " 'g',\n",
-        " 'p',\n",
-        " 'b',\n",
-        " 'v',\n",
-        " 'k',\n",
-        " 'x',\n",
-        " 'j',\n",
-        " 'q',\n",
-        " 'z']"
-       ]
-      }
-     ],
-     "prompt_number": 9
-    },
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [
-      "def read_game():\n",
-      "    discovered = input('Enter the discovered word: ')\n",
-      "    missed = input('Enter the wrong guesses: ')\n",
-      "    guessed_letters = [l.lower() for l in discovered + missed if l in string.ascii_letters]\n",
-      "    unguessed_letters_in_order = ordered_subtract(letters_in_order, guessed_letters)\n",
-      "    print('My guess is:', unguessed_letters_in_order[0])"
-     ],
-     "language": "python",
-     "metadata": {},
-     "outputs": [],
-     "prompt_number": 10
-    },
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [
-      "def ordered_subtract(ordered_list, to_remove):\n",
-      "    for r in to_remove:\n",
-      "        if r in ordered_list:\n",
-      "            ordered_list.remove(r)\n",
-      "    return ordered"
-     ],
-     "language": "python",
-     "metadata": {},
-     "outputs": [],
-     "prompt_number": 13
-    },
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [
-      "letters_in_order"
-     ],
-     "language": "python",
-     "metadata": {},
-     "outputs": [
-      {
-       "metadata": {},
-       "output_type": "pyout",
-       "prompt_number": 12,
-       "text": [
-        "['e',\n",
-        " 't',\n",
-        " 'a',\n",
-        " 'o',\n",
-        " 'i',\n",
-        " 'h',\n",
-        " 'n',\n",
-        " 's',\n",
-        " 'r',\n",
-        " 'd',\n",
-        " 'l',\n",
-        " 'u',\n",
-        " 'm',\n",
-        " 'w',\n",
-        " 'c',\n",
-        " 'y',\n",
-        " 'f',\n",
-        " 'g',\n",
-        " 'p',\n",
-        " 'b',\n",
-        " 'v',\n",
-        " 'k',\n",
-        " 'x',\n",
-        " 'j',\n",
-        " 'q',\n",
-        " 'z']"
-       ]
-      }
-     ],
-     "prompt_number": 12
-    },
-    {
-     "cell_type": "code",
-     "collapsed": false,
-     "input": [
-      "ordered_subtract(letters_in_order, ['etaoin'])"
-     ],
-     "language": "python",
-     "metadata": {},
-     "outputs": []
-    }
-   ],
-   "metadata": {}
-  }
- ]
-}
\ No newline at end of file