From 0b5c977797496e442218de81d6821cefcd20d2f5 Mon Sep 17 00:00:00 2001 From: juelpb <70725086+juelpb@users.noreply.github.com> Date: Tue, 15 Mar 2022 10:16:14 +0100 Subject: [PATCH] Push A8 and S6 --- .../Assignment08/AdaptiveSimpson.ipynb | 109 + Assignments/Assignment08/Rekursjon(ENG).ipynb | 562 ++ Assignments/Assignment08/Rekursjon.ipynb | 576 ++ Assignments/Assignment08/Sjakk(ENG).ipynb | 108 + Assignments/Assignment08/Sjakk.ipynb | 126 + Assignments/Assignment08/Sudoku(ENG).ipynb | 85 + Assignments/Assignment08/Sudoku.ipynb | 102 + Assignments/Assignment08/_Assignment08.ipynb | 68 + .../Assignment08/alice_in_wonderland.txt | 3600 ++++++++++ Assignments/Assignment08/lisens_peter_pan.txt | 399 ++ Assignments/Assignment08/peter_pan.txt | 6195 +++++++++++++++++ ...ering av karakterer i en streng - lf.ipynb | 47 + Solutions/Assignment06/Fjesboka - Lf.ipynb | 69 + .../Gaussian_elimination_solutions.ipynb | 635 ++ .../Assignment06/Ideell gasslov - Lf.ipynb | 71 + .../Innebygde funksjoner og lister - Lf.ipynb | 63 + ...ion_assignment__new__with_solutions_.ipynb | 427 ++ Solutions/Assignment06/Krypto - Lf.ipynb | 94 + Solutions/Assignment06/Litt sjakk - lf.ipynb | 107 + .../Sammenhengende tallrekke - Lf.ipynb | 82 + .../Slicing av strenger - lf.ipynb | 56 + Solutions/Assignment06/Sortering - Lf.ipynb | 64 + .../Strengemanipulasjon - Lf.ipynb | 61 + .../Strenger og konkatinering - Lf.ipynb | 51 + .../Assignment06/Strenghaandtering - Lf.ipynb | 72 + .../Assignment06/Tekstbehandling - Lf.ipynb | 49 + 26 files changed, 13878 insertions(+) create mode 100644 Assignments/Assignment08/AdaptiveSimpson.ipynb create mode 100644 Assignments/Assignment08/Rekursjon(ENG).ipynb create mode 100644 Assignments/Assignment08/Rekursjon.ipynb create mode 100644 Assignments/Assignment08/Sjakk(ENG).ipynb create mode 100644 Assignments/Assignment08/Sjakk.ipynb create mode 100644 Assignments/Assignment08/Sudoku(ENG).ipynb create mode 100644 Assignments/Assignment08/Sudoku.ipynb create mode 100644 Assignments/Assignment08/_Assignment08.ipynb create mode 100644 Assignments/Assignment08/alice_in_wonderland.txt create mode 100644 Assignments/Assignment08/lisens_peter_pan.txt create mode 100644 Assignments/Assignment08/peter_pan.txt create mode 100644 Solutions/Assignment06/Aksessering av karakterer i en streng - lf.ipynb create mode 100644 Solutions/Assignment06/Fjesboka - Lf.ipynb create mode 100644 Solutions/Assignment06/Gaussian_elimination_solutions.ipynb create mode 100644 Solutions/Assignment06/Ideell gasslov - Lf.ipynb create mode 100644 Solutions/Assignment06/Innebygde funksjoner og lister - Lf.ipynb create mode 100644 Solutions/Assignment06/Interpolation_assignment__new__with_solutions_.ipynb create mode 100644 Solutions/Assignment06/Krypto - Lf.ipynb create mode 100644 Solutions/Assignment06/Litt sjakk - lf.ipynb create mode 100644 Solutions/Assignment06/Sammenhengende tallrekke - Lf.ipynb create mode 100644 Solutions/Assignment06/Slicing av strenger - lf.ipynb create mode 100644 Solutions/Assignment06/Sortering - Lf.ipynb create mode 100644 Solutions/Assignment06/Strengemanipulasjon - Lf.ipynb create mode 100644 Solutions/Assignment06/Strenger og konkatinering - Lf.ipynb create mode 100644 Solutions/Assignment06/Strenghaandtering - Lf.ipynb create mode 100644 Solutions/Assignment06/Tekstbehandling - Lf.ipynb diff --git a/Assignments/Assignment08/AdaptiveSimpson.ipynb b/Assignments/Assignment08/AdaptiveSimpson.ipynb new file mode 100644 index 0000000..74d0f91 --- /dev/null +++ b/Assignments/Assignment08/AdaptiveSimpson.ipynb @@ -0,0 +1,109 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Adaptive Simpson's Rule\n", + "\n", + "**Learning goals**\n", + "- Recursion\n", + "- Adaptive Simpson's rule\n", + "\n", + "Simpson's method is an algorithm for computing approximate integrals of functions, defined as \n", + "$$ \\int_{a}^{b} f(x) dx \\approx S(a,b) = \\frac{h}{3}(f(a) + 4f(c) + f(b)), $$\n", + "where\n", + "$$ h = \\frac{b-a}{2}, \\qquad c = \\frac{a+b}{2}. $$\n", + "\n", + "\n", + "Note: It is worth specifying that this is not the composite Simpson's rule." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### a)\n", + "\n", + "Make a function `simpsons_method(f, a, b)` that takes as input a function `f`, a starting point `a`, and a stopping point `b` and returns the Simpson's method approximation to the integral of $f$ from $a$ to $b$.\n", + "\n", + "***Example run***\n", + "```python\n", + "import math\n", + "def f(x):\n", + " return math.log(x)\n", + "print(simpsons_method(f,1,2))\n", + " \n", + "#output:\n", + "0.3858346021654338\n", + "```\n", + "\n", + "**Write your code in the block below**" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## b)\n", + "To compute the integral more accurately we can either use the composite Simpson's rule, or the more economical adaptive Simpson's rule which is able to compute integrals with a guaranteed error of less than or equal to epsilon. This algorithm is formulated recursively through the following steps:\n", + "\n", + "1. Given f and an interval `[a,b]`, compute the regular Simpson's approximation `whole = simpsons_method(f,a,b)` on the whole interval\n", + "2. Find the midpoint `c = (a+b)/2` and compute the Simpson's approximations on the left and right halves of the interval: `left = simpsons_method(f,a,c)`, `right = simpsons_method(f,c,b)`. \n", + "3. If `|left + right - whole| > 15*epsilon`, use recursive Simpson's method on the intervals `[a,c]` and `[c,b]` with halved tolerance `epsilon/2`, then return the two approximation added together. \n", + " * Otherwise, the approximation is accurate enough, so return the improved value `(16*(left + right) - whole)/15`\n", + " \n", + " Make a function `recursive_simpson(f,a,b,tol)` that uses the adaptive Simpson's rule *recursively* to compute the integral of $f$ from $a$ to $b$. The inputs `f`, `a` and `b` are as defined in *a)* and `tol` is the error tolerance. The function should return an estimate of the integral.\n", + " \n", + "**example run**\n", + "```python\n", + "import math\n", + "def f(x):\n", + " return math.log(x)\n", + "print(recursive(f, 1 , 2, 0.00001))\n", + " \n", + "#output:\n", + "0.386294208843096\n", + "```\n", + "The exact value is 0.3862943611198906. \n", + "\n", + "**Write your code in the block below**\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Assignments/Assignment08/Rekursjon(ENG).ipynb b/Assignments/Assignment08/Rekursjon(ENG).ipynb new file mode 100644 index 0000000..00973fd --- /dev/null +++ b/Assignments/Assignment08/Rekursjon(ENG).ipynb @@ -0,0 +1,562 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "\n", + "# Recursion\n", + "\n", + "**Learning goals:**\n", + "\n", + "* Recursion\n", + "* Algorithms\n", + "\n", + "**Starting Out with Python:**\n", + "\n", + "* Kap. 12: Recursion" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "heading_collapsed": true, + "run_control": { + "frozen": true + } + }, + "source": [ + "### What is Recursion?" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "hidden": true, + "run_control": { + "frozen": true + } + }, + "source": [ + "If a function calls itself, we call it a recursive function. The concept of a function calling itself is called recursion. Recursion is an important conecpt in computer science, and is a widely used technique for solving problems that can be divided into similar, smaller subproblems. For instance, a series of search algorithms take advantage of this technique.\n", + "\n", + "\n", + "\n", + "Let us start by looking at a very simple function that uses recursion. As mentioned above, this simply means that the function calls itself.\n", + "\n", + "**Example:**" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "hidden": true + }, + "outputs": [], + "source": [ + "# run this yourself\n", + "def counter(number=0): \n", + " print(\"We have now arrived at: \", number)\n", + " counter(number + 1)\n", + " \n", + "counter()" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "hidden": true, + "run_control": { + "frozen": true + } + }, + "source": [ + "This is an example of a counter that is implemented recursively. The function starts by counting from zero, as this is the default value it has been given. It then proceeds to call itself, with the value incremented. We can also implement another function with the same functionality iteratively, with the help of loops. The function below will do the same as our recursive counter." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "hidden": true + }, + "outputs": [], + "source": [ + "# run this yourself\n", + "def counter2():\n", + " number = 0\n", + " while True:\n", + " print(\"We have now arrived at: \", number)\n", + " number += 1\n", + " \n", + "counter2()" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "hidden": true, + "run_control": { + "frozen": true + } + }, + "source": [ + "However, as you may have noticed, our recursive function has a big weakness, it never stops. Our function will keep counting until we get a RecursionError, which tells us that the maximum recursion depth has been reached. We can view this as digging a hole. Every time a recursive function calls itself, we dig ourselves a little further down the hole, and Python sets a limit of how far we can dig. Hopefully we want to get up from the hole as well, but that is for later. First let us keep our attention on our function which never ends.\n", + "\n", + "Recursive functions need what we call a **base case**, a place where the code knows when to stop. Let us attempt to modify the counter so that it stops counting once it has reached 10." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "ExecuteTime": { + "end_time": "2019-07-05T06:25:12.112924Z", + "start_time": "2019-07-05T06:25:12.100102Z" + }, + "hidden": true + }, + "outputs": [], + "source": [ + "# run this yourself\n", + "def counter(number=0):\n", + " print(\"We have now arrived at: \", number)\n", + " if(number<10):\n", + " counter(number + 1)\n", + " \n", + "counter()" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "hidden": true, + "run_control": { + "frozen": true + } + }, + "source": [ + "As you can verify yourself, our function will count up to 10, before it stops. We have a case where the function finds out that it has to stop, and Python does not have to give us a strict message that we have to stop calling our function. Previously we mentioned the hopes of climbing up from the hole we made, so let us have a look at a classic use case for recursion, namely calculating the factorial of a number." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "ExecuteTime": { + "end_time": "2019-07-05T06:31:27.611550Z", + "start_time": "2019-07-05T06:31:27.594077Z" + }, + "hidden": true + }, + "outputs": [], + "source": [ + "# run this yourself\n", + "def factorial(number):\n", + " if number==0:\n", + " return 1\n", + " else:\n", + " return number*factorial(number-1)\n", + "\n", + "factorial(5)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "hidden": true, + "run_control": { + "frozen": true + } + }, + "source": [ + "Here our base case is based upon the fact that zero factorial equals 1. For other numbers, we know that the factorial of a given number is equal to the number times the factorial of itself minus one. For instance, 5! = 5 * 4!. This can easily be solved recursively, as we already did. What is different in this example, is that we are using the result from each of our function calls. When we call the function with the number 3, the following will happen:\n", + "\n", + "> We are trying to evaluate 3!, but since we need 2!, we call the function again. \n", + "We are trying to evaluate 2!, but since we need 1!, we call the function again. \n", + "We are trying to evaluate 1!, but since we need 0!, we call the function again. \n", + "We are trying to evaluate 0!, we know this is 1. \n", + "We are using the result from above, finding out 1! is 1. \n", + "We are using the result from above, finding out 2! is 2. \n", + "We are using the result from above, finding out 3! is 6. \n", + "\n", + "\n", + "If we keep using the digging analogy, we can see that we have two stages, one where we call the function over and over and dig ourselves down, until we finally find the bottom and climb up again. By clicking [here](http://pythontutor.com/visualize.html#code=def%20fakultet%28tall%29%3A%0A%20%20%20%20if%20tall%3D%3D0%3A%0A%20%20%20%20%20%20%20%20return%201%0A%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20return%20tall*fakultet%28tall-1%29%0A%0Afakultet%285%29&cumulative=false&curInstr=26&heapPrimitives=nevernest&mode=display&origin=opt-frontend.js&py=3&rawInputLstJSON=%5B%5D&textReferences=false) you can visualize how we calculate the factorial step by step." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "hidden": true, + "run_control": { + "frozen": true + } + }, + "source": [ + "Let us have a look at another example, only this time we will use lists, where want to sum all the elements recursively. As mentioned in the introduction, recursion is widely used in sorting algorithms, and even if it may seem that things we do recursively always can be done iteratively, it is not always the case. Therefore recursion is important to understand, even if it is hard." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "ExecuteTime": { + "end_time": "2019-07-05T06:55:48.783091Z", + "start_time": "2019-07-05T06:55:48.771923Z" + }, + "hidden": true + }, + "outputs": [], + "source": [ + "# run this yourself\n", + "def list_sum(lst):\n", + " if(len(lst)==1):\n", + " return lst[0] #if the list only has one element, the sum is that one element.\n", + " else:\n", + " return lst[0]+list_sum(lst[1:]) #otherwise we take the first element and add it to the sum of the rest of the list\n", + " \n", + "list_sum([1,2,3])" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "hidden": true, + "run_control": { + "frozen": true + } + }, + "source": [ + "This might seem quite similar to the previous example, except that we are focusing on a list, but let us also now view step by step what is going on.\n", + "\n", + "> We want the sum of [1,2,3], we know this is 1 + the sum of [2,3], we call the function again. \n", + "We want the sum of [2,3], we know this is 2 + the sum of [3], we call the function again. \n", + "We know that the sum of [3] is 3, we return it to the function-call above. \n", + "The sum of [3] was 3, therefore the sum of [2,3] = 2 + 3 = 5 \n", + "The sum of [2,3] var 5, therefore the sum of [1,2,3] = 1 + 5 = 6. \n", + "\n", + "This looks a lot like what we did when we implemented the factorial, we work ourselves down, reach the bottom and go back up. Click [here](http://pythontutor.com/visualize.html#code=def%20liste_sum%28liste%29%3A%0A%20%20%20%20if%28len%28liste%29%3D%3D1%29%3A%0A%20%20%20%20%20%20%20%20return%20liste%5B0%5D%20%23dersom%20listen%20kun%20har%20et%20element%20er%20summen%20v%C3%A5r%20bare%20det%20ene%20elementet%0A%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20return%20liste%5B0%5D%2Bliste_sum%28liste%5B1%3A%5D%29%20%23ellers%20tar%20vi%20det%20f%C3%B8rste%20elementet%20og%20legger%20til%20summen%20av%20resten%20av%20lista%0A%20%20%20%20%0Aliste_sum%28%5B1,2,3%5D%29&cumulative=false&curInstr=0&heapPrimitives=nevernest&mode=display&origin=opt-frontend.js&py=3&rawInputLstJSON=%5B%5D&textReferences=false) for a visualization.\n", + "\n", + "Now you have had a quick introduction to how to program recursively. If you want a little different kind of introduction to the topic, you can check out [this link](https://realpython.com/python-thinking-recursively/)." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "### a) Recursive sum" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "Write a function `recursive_sum(n)` which takes in an integer n and evaluates the sum of 1 + 2 + ... + n using recursion.\n", + "\n", + "**Example run:**\n", + "```python\n", + ">>>print(recursive_sum(53))\n", + "1431\n", + "```" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "#### Hint" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "Check out the example of factorial in the tutorial." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "### b) Merge sum" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "Write a function `merge_sum(liste)` that sums all the elements in a list, except in a slightly different way than the tutorial.\n", + "* Assume there is an even number of elements in the list.\n", + "* When you are summing the elements, this will be done by dividing the list in two, and adding the sums each half." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "#### Hint" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "Think of the base case and what the function should return. \n", + "Where should the list be divided?" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "### c) Smallest element" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "Write a recursive function `find_smallest_element(numbers)` which takes in a list numbers containing integers and find the smallest element in the list. *Note: You may not use the built-in functions in Python such as min(list), to solve this task.*\n", + "\n", + "\n", + "```python\n", + ">>>print(find_smallest_element([5,3,2,6]))\n", + "2\n", + "```" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "#### Hint" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "Have a look at the example listsum in the tutorial. Here you will be able to use a similar approach, but with slightly different logic." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "### d) Binary search" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "Write a recursive function `binary_search(numbers, element)` which takes in a sorted list **numbers** with integers and an integer **element** and returns the position (index) of the element if it exists in the list. If the number does not exist, the function should return negative infinity ( `-float('inf')` ). You are going to do this with the help of [the binary search algorithm](https://en.wikipedia.org/wiki/Binary_search_algorithm). \n", + "\n", + "You may also implement the function `binary_search(numbers, element, minimum, maximum)`, i.e. the same function, with the same functionaly, in addition to the parameters **minimum** and **maxmimum**, which is used to indicate the indeces (the interval) we are searching over.\n", + "\n", + "**Note**: You may not use the built-in functions in Python such as list.index(element), to solve this task.\n", + "\n", + "**BONUS**: If the list numbers contain n elements, how many function calls would the binary search algorithm require for the worst case in order to find the position of the element in the list? (or that the element is not in the list)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "#### Hint" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "ExecuteTime": { + "end_time": "2019-07-05T07:40:52.433819Z", + "start_time": "2019-07-05T07:40:52.424489Z" + }, + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "Consider the element in the middle." + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.1" + }, + "toc": { + "base_numbering": 1, + "nav_menu": {}, + "number_sections": false, + "sideBar": true, + "skip_h1_title": false, + "title_cell": "Table of Contents", + "title_sidebar": "Contents", + "toc_cell": false, + "toc_position": {}, + "toc_section_display": true, + "toc_window_display": false + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Assignments/Assignment08/Rekursjon.ipynb b/Assignments/Assignment08/Rekursjon.ipynb new file mode 100644 index 0000000..27fc8b2 --- /dev/null +++ b/Assignments/Assignment08/Rekursjon.ipynb @@ -0,0 +1,576 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "<nav class=\"navbar navbar-default\">\n", + " <div class=\"container-fluid\">\n", + " <div class=\"navbar-header\">\n", + " <a class=\"navbar-brand\" href=\"_Oving10.ipynb\">Øving 10</a>\n", + " </div>\n", + " <ul class=\"nav navbar-nav\">\n", + " <li class=\"active\"><a href=\"Rekursjon.ipynb\">Rekursjon (Obligatorisk TDT4109)</a></li>\n", + " <li ><a href=\"Matplotlib.ipynb\">Matplotlib (Obligatorisk TDT4110)</a></li>\n", + " <li ><a href=\"Eksamen%202012.ipynb\">Eksamen Python 2012</a></li>\n", + " <li ><a href=\"Sudoku.ipynb\">Sudoku</a></li>\n", + " <li ><a href=\"numpy-arrays%20og%20matplotlib.ipynb\">Numpy-arrays og matplotlib (TDT4110)</a></li>\n", + " <li ><a href=\"Bokanalyse%20med%20plotting.ipynb\">Bokanalyse med plotting (TDT4110)</a></li>\n", + " <li ><a href=\"Sjakk.ipynb\">Sjakk</a></li>\n", + " </ul>\n", + " </div>\n", + "</nav>\n", + "\n", + "\n", + "# Rekursjon\n", + "\n", + "**Læringsmål:**\n", + "\n", + "* Rekursjon\n", + "* Algoritmer\n", + "\n", + "**Starting Out with Python:**\n", + "\n", + "* Kap. 12: Recursion" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "heading_collapsed": true, + "run_control": { + "frozen": true + } + }, + "source": [ + "### Rekursjon, hva er det?" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "hidden": true, + "run_control": { + "frozen": true + } + }, + "source": [ + "Dersom en funksjon kaller på seg selv kaller vi dette for rekursjon. Rekursjon er et viktig konsept innenfor datateknologi, og det er en mye brukt teknikk for å løse problemer som kan deles opp i mindre tilsvarende subproblemer. For eksempel bygger en rekke søkealgoritmer på konseptet rekursjon.\n", + "\n", + "\n", + "\n", + "La oss begynne å se på en veldig enkel funksjon som benytter seg av rekursjon, som nevnt betyr dette bare at funksjonen kaller seg selv.\n", + "\n", + "**Eksempel:**" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "hidden": true + }, + "outputs": [], + "source": [ + "def teller(nummer=0):\n", + " print(\"Nå har vi kommet til: \", nummer)\n", + " teller(nummer + 1)\n", + " \n", + "teller()" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "hidden": true, + "run_control": { + "frozen": true + } + }, + "source": [ + "Her ser vi en teller implementert rekursivt. Funksjonen begynner å telle fra null, siden det er standardverdien vi har gitt, før den kaller seg selv på nytt, men denne gangen med økt verdi. Vi kan også lage en funksjon med samme funksjonalitet iterativt, ved hjelp av løkker. Funksjonen under vil gjøre akkurat det samme som vår rekursive teller." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "hidden": true + }, + "outputs": [], + "source": [ + "def teller2():\n", + " nummer = 0\n", + " while True:\n", + " print(\"Nå har vi kommet til: \", nummer)\n", + " nummer += 1\n", + " \n", + "teller()" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "hidden": true, + "run_control": { + "frozen": true + } + }, + "source": [ + "Men, som du kanskje har lagt merke til, har vår rekursive funksjon en stor svakhet, den slutter aldri. Funksjonen vår vil fortsette å telle helt til vi får en RecursionError, hvor vi får beskjed om at maksimum rekursjons dybde er nådd. Vi kan se på det som at hver gang vi kaller en rekursiv funksjon graver vi oss lengre ned i et hull, og Python setter en grense for hvor langt ned vi kan grave, forhåpentligvis ønsker vi å komme oss opp igjen av hullet også, men det ser vi på litt senere. Først la oss fokusere på at funksjonen vår aldri avslutter.\n", + "\n", + "Rekursive funksjoner trenger det vi kaller vi et **grunntilfelle**, et sted hvor koden innser at det er på tide å slutte. La oss prøve å endre telleren slik at den slutter å telle når den kommer til 10." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "ExecuteTime": { + "end_time": "2019-07-05T06:25:12.112924Z", + "start_time": "2019-07-05T06:25:12.100102Z" + }, + "hidden": true + }, + "outputs": [], + "source": [ + "def teller(nummer=0):\n", + " print(\"Nå har vi kommet til: \", nummer)\n", + " if(nummer<10):\n", + " teller(nummer + 1)\n", + " \n", + "teller()" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "hidden": true, + "run_control": { + "frozen": true + } + }, + "source": [ + "Som du nå selv kan teste, vil funksjonen vår telle til 10, før den gir seg. Vi har et tilfelle hvor funksjonen finner ut at den skal stoppe, og vi slipper at Python skal gi oss en streng beskjed om at vi må slutte å kalle funksjonen vår. Tidligere nevnte vi også ambisjoner om å klatre opp igjen fra hullet vi har laget oss, så la oss først ta en kikk på en klassiskt bruksområde når det kommer til rekursjon, nemlig hvordan vi kan regne fakultet:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "ExecuteTime": { + "end_time": "2019-07-05T06:31:27.611550Z", + "start_time": "2019-07-05T06:31:27.594077Z" + }, + "hidden": true + }, + "outputs": [], + "source": [ + "def fakultet(tall):\n", + " if tall==0:\n", + " return 1\n", + " else:\n", + " return tall*fakultet(tall-1)\n", + "\n", + "fakultet(5)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "hidden": true, + "run_control": { + "frozen": true + } + }, + "source": [ + "Her baserer vi oss på grunntilfellet hvor null fakultet er lik 1. Ellers vet vi at fakultet av et tall er lik tallet selv gange fakultet av tallet selv minus en. Altså f.eks. er 5! = 5 * 4!. Det kan vi enkelt løse rekursivt, som vi allerede har gjort. Det som er nytt for dette eksempelet er at vi faktisk benytter oss av resultatet av funksjonskallene våre. Når vi kaller funksjonen med tallet 3 vil følgende skje:\n", + "\n", + "> Vi prøver å regne ut 3! men siden vi trenger 2! kaller vi funksjonen på nytt. \n", + "Vi prøver å regne ut 2! men siden vi trenger 1! kaller vi funksjonen på nytt. \n", + "Vi prøver å regne ut 1! men siden vi trenger 0! kaller vi funksjonen på nytt. \n", + "Vi prøver å regne ut 0!, det vet vi er 1. \n", + "Vi benytter oss av resultatet over, finner ut at 1! er 1. \n", + "Vi benytter oss av resultatet over, finner ut at 2! er 2. \n", + "Vi benytter oss av resultatet over, finner ut at 3! er 6. \n", + "\n", + "Hvis vi fortsetter å tenke på grave-eksempelet kan vi se at vi over har to faser, en hvor vi kaller funksjonen på nytt og graver oss ned, før vi omsider finner bunnen og klatrer opp igjen. Ved å trykke [her](http://pythontutor.com/visualize.html#code=def%20fakultet%28tall%29%3A%0A%20%20%20%20if%20tall%3D%3D0%3A%0A%20%20%20%20%20%20%20%20return%201%0A%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20return%20tall*fakultet%28tall-1%29%0A%0Afakultet%285%29&cumulative=false&curInstr=26&heapPrimitives=nevernest&mode=display&origin=opt-frontend.js&py=3&rawInputLstJSON=%5B%5D&textReferences=false) kan du få visualisert hvordan vi regner ut fakultet av fem steg for steg.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "hidden": true, + "run_control": { + "frozen": true + } + }, + "source": [ + "La oss ta en kikk på en nytt eksempel men denne gangen skal vi bruke en liste, hvor vi ønsker å summere alle elementene rekursivt. Som nevnt introduksjonsmessig er rekursivitet brukt mye i sorteringsalgoritmer, og selv om det ofte kan virke som om det vi gjør rekursivt alltid kan gjøres iterativt, er ikke det alltid tilfelle. Rekursjon er derfor viktig å forstå, selv om det også er vanskelig." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "ExecuteTime": { + "end_time": "2019-07-05T06:55:48.783091Z", + "start_time": "2019-07-05T06:55:48.771923Z" + }, + "hidden": true + }, + "outputs": [], + "source": [ + "def liste_sum(liste):\n", + " if(len(liste)==1):\n", + " return liste[0] #dersom listen kun har et element er summen vår bare det ene elementet\n", + " else:\n", + " return liste[0]+liste_sum(liste[1:]) #ellers tar vi det første elementet og legger til summen av resten av lista\n", + " \n", + "liste_sum([1,2,3])" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "hidden": true, + "run_control": { + "frozen": true + } + }, + "source": [ + "Det er kanskje ikke så mye nytt her med unntak av at vi denne gangen fokuserer på en liste, men la oss også nå se steg for seg hva som skjer.\n", + "\n", + "> Vi vil ha summen av [1,2,3], vi vet dette er 1 + summen av [2,3], vi kaller funksjonen på nytt \n", + "Vi vil ha summen av [2,3], vi vet dette er 2 + summen av [3], vi kaller funksjonen på nytt \n", + "Vi vet at summen av [3] er 3, så vi gir verdien til funksjons-kallet over. \n", + "Siden summen av [3] var 3, er summen [2,3] = 2 + 3 = 5 \n", + "Siden summen av [2,3] var 5, er summen av [1,2,3] = 1 + 5 = 6. \n", + "\n", + "Det ligner mye på det vi gjorde når vi implementerte fakultet, vi jobber oss nedover, når bunnen, og går tilbake opp. Trykk [her](http://pythontutor.com/visualize.html#code=def%20liste_sum%28liste%29%3A%0A%20%20%20%20if%28len%28liste%29%3D%3D1%29%3A%0A%20%20%20%20%20%20%20%20return%20liste%5B0%5D%20%23dersom%20listen%20kun%20har%20et%20element%20er%20summen%20v%C3%A5r%20bare%20det%20ene%20elementet%0A%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20return%20liste%5B0%5D%2Bliste_sum%28liste%5B1%3A%5D%29%20%23ellers%20tar%20vi%20det%20f%C3%B8rste%20elementet%20og%20legger%20til%20summen%20av%20resten%20av%20lista%0A%20%20%20%20%0Aliste_sum%28%5B1,2,3%5D%29&cumulative=false&curInstr=0&heapPrimitives=nevernest&mode=display&origin=opt-frontend.js&py=3&rawInputLstJSON=%5B%5D&textReferences=false) for en visualisering.\n", + "\n", + "Nå har du fått en rask innføring i hvordan programmere rekursivt. Hvis du vil ha en litt annen innføring i temaet kan du sjekke ut [denne linken](https://realpython.com/python-thinking-recursively/). " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### a) Rekursiv sum" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "Skriv en funksjon `recursive_sum(n)` som tar inn et heltall n og regner summen av 1+2+...+n ved hjelp av rekursjon. \n", + "\n", + "**Eksempel på kjøring:**\n", + "```python\n", + ">>>print(recursive_sum(53))\n", + "1431\n", + "```" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "heading_collapsed": true, + "run_control": { + "frozen": true + } + }, + "source": [ + "#### Hint" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "hidden": true, + "run_control": { + "frozen": true + } + }, + "source": [ + "Se på eksempelet med fakultet i tutorialen." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "### b) Merge sum" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "Skriv en funksjon `merge_sum(liste)` som summerer alle elementene i en liste men på en litt annen måte enn i tutorialen. \n", + "\n", + "* Anta et partall antall elementer i lista.\n", + "* Når du skal summere elementene skal det gjøres ved å dele lista i to, og så addere summen av hver halvdel av listen. " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "heading_collapsed": true, + "run_control": { + "frozen": true + } + }, + "source": [ + "#### Hint" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "hidden": true, + "run_control": { + "frozen": true + } + }, + "source": [ + "Tenk på grunntilfellet og hva funksjonen skal returnere. \n", + "Hvor skal vi dele lista?" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "### c) Minste element" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "Skriv en rekursiv funksjon `find_smallest_element(numbers)` som tar inn en liste numbers med heltall og finner det minste elementet i listen. \n", + "*Merk: Du kan ikke bruke innebygde funksjoner i Python som min(liste), for å løse denne oppgaven.*\n", + "\n", + "```python\n", + ">>>print(find_smallest_element([5,3,2,6]))\n", + "2\n", + "```" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "heading_collapsed": true, + "run_control": { + "frozen": true + } + }, + "source": [ + "#### Hint" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "hidden": true, + "run_control": { + "frozen": true + } + }, + "source": [ + "Ta en kikk på eksempelet med listesum i tutorialen. Her vil du kunne buke en lignende framgangsmåte, men med en litt annen logikk." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "### d) Binærsøk" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "Skriv en rekursiv funksjon `binary_search(numbers, element)` som tar inn en sortert liste **numbers** med heltall og et heltall **element** og returnerer posisjonen(indeksen) til elementet dersom det finnes i listen. Hvis det ikke finnes skal funksjonen returnere minus uendelig (**-float('inf')**). Dette skal du gjøre ved å benytte deg av [binærsøk-algoritmen](https://en.wikipedia.org/wiki/Binary_search_algorithm). \n", + "\n", + "Du kan også implementere funksjonen `binary_search(numbers, element, minimum, maximum)`, altså samme funksjon, med samme funksjonalitet, men med parameterene **minimum** og **maximum**, som vi kan bruke til å angi indeksene vi søker på i lista.\n", + "\n", + "*Merk: I denne oppgaven er det ikke lov til å bruke innebygde funksjoner i Python som liste.index(element).* \n", + "\n", + "**BONUS**: Hvis listen numbers inneholder n elementer, hvor mange funksjonskall vil binærsøk-algoritmen i worst case trenge for å finne posisjonen til elementet i listen? (eller at elementet ikke er i listen)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "heading_collapsed": true, + "run_control": { + "frozen": true + } + }, + "source": [ + "#### Hint" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "ExecuteTime": { + "end_time": "2019-07-05T07:40:52.433819Z", + "start_time": "2019-07-05T07:40:52.424489Z" + }, + "deletable": false, + "editable": false, + "hidden": true, + "run_control": { + "frozen": true + } + }, + "source": [ + "Tenk på midterste element." + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.4" + }, + "toc": { + "base_numbering": 1, + "nav_menu": {}, + "number_sections": false, + "sideBar": true, + "skip_h1_title": false, + "title_cell": "Table of Contents", + "title_sidebar": "Contents", + "toc_cell": false, + "toc_position": {}, + "toc_section_display": true, + "toc_window_display": false + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Assignments/Assignment08/Sjakk(ENG).ipynb b/Assignments/Assignment08/Sjakk(ENG).ipynb new file mode 100644 index 0000000..78de750 --- /dev/null +++ b/Assignments/Assignment08/Sjakk(ENG).ipynb @@ -0,0 +1,108 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "# Chess\n", + "\n", + "**Learning goals:**\n", + "\n", + "* Big problems\n", + "\n", + "**In this task you are going to write a bigger prorgram. For this type of tasks, it might be more practical to download python and an IDE (An environment in which you program on your own machine). As such, have a look [here](https://docs.google.com/document/d/17tS0maWyzORUsIjmCVEszfqrl2X4By-Cy2Sw3ENG5lA/edit?usp=sharing) before you start.\n", + "It is still possible to do the task in Jupyter if you do not wish to work locally, even if it is unadvised.**\n", + "\n", + "In this task you are going to implement chess. Begin working on the task as soon as possible, and work on it regularly (this task requires a lot of work).\n", + "\n", + "Use teaching assistans when you have the opportunity.\n", + "\n", + "Below is a suggested approach, but you are free to do it the way you want. However, the program needs to fulfill the following requirements:\n", + "\n", + "1. The players must give the program their moves (text based).\n", + "2. The program must prevent players from making illegal moves.*\n", + "3. The program must detect and signal when a player is in check.\n", + "4. The program must detect and signal it is checkmate.\n", + "5. If a pawn reaches the other side of the board, it will be promoted to an officer (queen, rook, bishop or knight).\n", + "\n", + "***You do NOT need to take into consideration stalemate, draw, en passant, castling or time control.**\n", + "\n", + "The rules of chess and how the pieces can move, can be found here: http://en.wikipedia.org/wiki/Chess\n", + "\n", + "**Suggested approach**\n", + "\n", + "\n", + "Here you will find a suggested approach, it is instructional, but can be of help if you do not know where to begin.\n", + "\n", + "\n", + "**a)** Choose a way to represent a chess board. We recommend a two-dimensional list. Also choose how you will represent an empty cell and cells that contain pieces.\n", + "\n", + " \n", + "\n", + "**b)** Initialize the board with all the pieces in their correct starting position.\n", + "\n", + " \n", + "\n", + "**c)** Make it possible to see the pieces on the screen. I.e. write a function that prints out the board in a nice manner.\n", + "\n", + "For a prettier design, copy and paste these symbols in your code: ♖, ♜, ♗, ♝, ♘, ♞, ♕, ♛, ♔, ♚, ♙, ♟\n", + "\n", + " \n", + "\n", + "**d)** Make it possible for a player to move a piece. How do you implement a piece beating another?\n", + " \n", + "\n", + "**e)** Implement functionality that checks whether a move is legal. Do this for several cases:\n", + "1. Is the move of legal form? ('L' shaped for knight, diagonal for bishop, etc.)\n", + "2. Is the move blocked by another piece?\n", + "3. Beware that it is not possible to knock out a piece of your own color.\n", + " \n", + "\n", + "**f)** Write functionality that tests whether the king is in check. Remember that it is illegal to put your own king in check, extend the tests above so that this is accounted for.\n", + "\n", + " \n", + "\n", + "**g)** Write functionality that checks whether a king is in checkmate (Here you may re-use the code from the check-test).\n", + " \n", + "\n", + "**h)** Write functionality that detects that a pawn has been moved to do the other side of the board and let the player promote it to a queen/rook/bishop/knight." + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "#write your code here if you decide to code in jupyter, we recommend to code this task in idle or pycharm." + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Assignments/Assignment08/Sjakk.ipynb b/Assignments/Assignment08/Sjakk.ipynb new file mode 100644 index 0000000..ef58a4c --- /dev/null +++ b/Assignments/Assignment08/Sjakk.ipynb @@ -0,0 +1,126 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "<nav class=\"navbar navbar-default\">\n", + " <div class=\"container-fluid\">\n", + " <div class=\"navbar-header\">\n", + " <a class=\"navbar-brand\" href=\"_Oving10.ipynb\">Øving 10</a>\n", + " </div>\n", + " <ul class=\"nav navbar-nav\">\n", + " <li ><a href=\"Rekursjon.ipynb\">Rekursjon (Obligatorisk TDT4109)</a></li>\n", + " <li ><a href=\"Matplotlib.ipynb\">Matplotlib (Obligatorisk TDT4110)</a></li>\n", + " <li ><a href=\"Eksamen%202012.ipynb\">Eksamen Python 2012</a></li>\n", + " <li ><a href=\"Sudoku.ipynb\">Sudoku</a></li>\n", + " <li ><a href=\"numpy-arrays%20og%20matplotlib.ipynb\">Numpy-arrays og matplotlib (TDT4110)</a></li>\n", + " <li ><a href=\"Bokanalyse%20med%20plotting.ipynb\">Bokanalyse med plotting (TDT4110)</a></li>\n", + " <li class=\"active\"><a href=\"Sjakk.ipynb\">Sjakk</a></li>\n", + " </ul>\n", + " </div>\n", + "</nav>\n", + "\n", + "\n", + "# Sjakk\n", + "\n", + "**Læringsmål:**\n", + "\n", + "* Store problemstillinger\n", + "\n", + "**I denne oppgaven skal du skrive et større program. For denne typen oppgaver kan det være mer praktisk å laste ned python og eventuelt en IDE (Et område man programmerer i på sin egen maskin). Ta derfor en kikk [her](https://docs.google.com/document/d/17tS0maWyzORUsIjmCVEszfqrl2X4By-Cy2Sw3ENG5lA/edit?usp=sharing) før du begynner. Det er fortsatt mulig å gjøre oppgaven i Jupyter dersom du ikke ønsker å jobbe lokalt, selv om det ikke er anbefalt.**\n", + "\n", + "I denne øvingen skal du implementere sjakk. Begynn med den så fort som mulig, og jobb med den kontinuerlig (les: denne oppgaven krever mye arbeid).\n", + "\n", + "Bruk læringsassistent på sal når du har muligheten.\n", + "\n", + "Under er forslag til fremgangsmåte, men du kan gjøre det som du vil. Det som kreves av programmet er:\n", + "\n", + "1. Programmet må kunne ta inn trekk fra spillerne (tekstbasert).\n", + "2. Programmet skal hindre spillerne i å gjøre ulovlige trekk.*\n", + "3. Programmet skal oppdage og si ifra når en spiller er i sjakk.\n", + "4. Programmet skal oppdage og si ifra når det er sjakkmatt.\n", + "5. Hvis en bonde når andre siden av brettet skal den bli forfremmet til en offiser (dronning, løper, springer eller tårn).\n", + "\n", + "**Du trenger IKKE ta hensyn til patt, remis, en passant, rokering eller tidskontroll.**\n", + "\n", + "Regler for sjakk og hvordan brikkene kan bevege seg finnes her: http://no.wikipedia.org/wiki/Sjakk\n", + "\n", + "**Forslag til framgangsmåte:**\n", + "\n", + "Her finner du et forslag til fremgangsmåte, den er veiledende, men kan være til hjelp hvis du ikke helt vet hvor du skal begynne.\n", + "\n", + "**a)** Velg en måte å representere et sjakkbrett. Vi anbefaler en todimensjonal liste. Velg også hvordan du skal representere en tom rute og at en rute er opptatt av en bestemt brikke.\n", + "\n", + " \n", + "\n", + "**b)** Initialiser brettet med alle brikkene i sin korrekte startposisjon.\n", + "\n", + " \n", + "\n", + "**c)** Gjør det mulig å se brikkene på skjermen. Med andre ord skriv en funksjon som printer ut brettet fint til skjermen.\n", + "\n", + "For et penere design, kopier og lim inn disse symbolene i koden din: ♖, ♜, ♗, ♝, ♘, ♞, ♕, ♛, ♔, ♚, ♙, ♟\n", + "\n", + " \n", + "\n", + "**d)** Gjør det mulig for en spiller å flytte på en brikke. Hvordan kan du implementere at en brikke tar en annen?\n", + "\n", + " \n", + "\n", + "**e)** Legg til funksjonalitet som sjekker om trekket er lovlig. Gjør dette i flere omganger:\n", + "\n", + "1. Er trekket av en gyldig form? (’L’ fasong for springer, diagonalt for løper etc.)\n", + "2. Er trekket blokkert av en annen brikke?\n", + "3. Pass på at det ikke er mulig å ta en brikke av din egen farge.\n", + " \n", + "\n", + "**f)** Skriv funksjonalitet som tester om kongen er i sjakk. Husk også at det er et ulovlig trekk å sette sin egen konge i sjakk, utvid testene over slik at dette også blir et ugyldig trekk.\n", + "\n", + " \n", + "\n", + "**g)** Skriv funksjonalitet for å sjekke om kongen er i sjakk-matt. (Her kan du gjenbruke kode fra sjakk-testen)\n", + "\n", + " \n", + "\n", + "**h)** Skriv funksjonalitet som oppdager at en bonde er flyttet til andre siden av brettet og la spilleren forfremme bonden til en dronning/tårn/løper/springer." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#skriv koden din her om du velger å kode i jupyter, vi anbefaler å kode denne oppgaven i idle eller pycharm" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Assignments/Assignment08/Sudoku(ENG).ipynb b/Assignments/Assignment08/Sudoku(ENG).ipynb new file mode 100644 index 0000000..4a249f3 --- /dev/null +++ b/Assignments/Assignment08/Sudoku(ENG).ipynb @@ -0,0 +1,85 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "# Sudoku\n", + "\n", + "**Learning goals.**\n", + "\n", + "* Big problems\n", + "\n", + "**In this task you are going to write a bigger program. For this type of tasks, it might be more practical to download python and an IDE (An environment in which you program on your own machine). As such, have a look [here](https://docs.google.com/document/d/17tS0maWyzORUsIjmCVEszfqrl2X4By-Cy2Sw3ENG5lA/edit?usp=sharing) before you start.\n", + "It is still possible to do the task in Jupyter if you do not wish to work locally, even if it is unadvised.**\n", + "\n", + "In this task we are going go create a sudoku game (before we create a sudoku solver in a few years). If you do not know the rules of sudoku, you can read them [here](https://en.wikipedia.org/wiki/Sudoku). Part 1 consists of creating a playable sudoku board.\n", + "\n", + "You are free to build the game the way you want, but the game must fulfill the following requirements:\n", + "\n", + "* The user must be able to write a number in a cell of their choice. If the number is invalid, i.e. not between 1 and 9, an error message will be printed.\n", + "* The user must not be able to fill in a number that already exists in the same row, column, or square.\n", + "* The user must be able to delete a number from a cell.\n", + "* Every time the user fills in or deletes a number, the new board will be printed in a nice manner. An example is given below (numbers above and next to the board that indicate column- and rownumber, respectively).\n", + "* The user must be able to load a board from a text file.\n", + "* It must be possible to save an incomplete board to a file, so that it can be finished later.\n", + "* The must print a nice congratulations in case the user succesfully completes the board.\n", + "* Everything shall be done through a user friendly interface. I.e. the user will not have to call the functions themselves, but everything is done through input or reading from/writing to file.\n", + "\n", + "Example board:\n", + ">```python\n", + " 0 1 2 3 4 5 6 7 8 \n", + " +-------+-------+-------+\n", + "0 | 0 0 6 | 9 0 5 | 0 1 0 |\n", + "1 | 9 7 0 | 0 1 2 | 3 0 5 |\n", + "2 | 0 2 0 | 0 0 4 | 8 6 0 |\n", + " +-------+-------+-------+\n", + "3 | 5 0 3 | 8 0 0 | 0 2 0 |\n", + "4 | 0 0 0 | 0 0 0 | 0 0 0 |\n", + "5 | 0 8 0 | 0 0 1 | 9 0 7 |\n", + " +-------+-------+-------+\n", + "6 | 0 5 4 | 1 0 0 | 0 7 0 |\n", + "7 | 2 0 7 | 4 5 0 | 0 9 3 |\n", + "8 | 0 6 0 | 7 0 3 | 1 0 0 |\n", + " +-------+-------+-------+\n", + "```" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#input your code here" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Assignments/Assignment08/Sudoku.ipynb b/Assignments/Assignment08/Sudoku.ipynb new file mode 100644 index 0000000..1f4ca92 --- /dev/null +++ b/Assignments/Assignment08/Sudoku.ipynb @@ -0,0 +1,102 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + " <nav class=\"navbar navbar-default\">\n", + " <div class=\"container-fluid\">\n", + " <div class=\"navbar-header\">\n", + " <a class=\"navbar-brand\" href=\"_Oving10.ipynb\">Øving 10</a>\n", + " </div>\n", + " <ul class=\"nav navbar-nav\">\n", + " <li class=\"active\"><a href=\"Rekursjon.ipynb\">Rekursjon (Obligatorisk TDT4109)</a></li>\n", + " <li ><a href=\"Matplotlib.ipynb\">Matplotlib (Obligatorisk TDT4110)</a></li>\n", + " <li ><a href=\"Eksamen%202012.ipynb\">Eksamen Python 2012</a></li>\n", + " <li ><a href=\"Sudoku.ipynb\">Sudoku</a></li>\n", + " <li ><a href=\"numpy-arrays%20og%20matplotlib.ipynb\">Numpy-arrays og matplotlib (TDT4110)</a></li>\n", + " <li ><a href=\"Bokanalyse%20med%20plotting.ipynb\">Bokanalyse med plotting (TDT4110)</a></li>\n", + " <li ><a href=\"Sjakk.ipynb\">Sjakk</a></li>\n", + " </ul>\n", + " </div>\n", + "</nav>\n", + "\n", + "\n", + "# Sudoku\n", + "\n", + "**Læringsmål.**\n", + "\n", + "* Store problemstillinger\n", + "\n", + "**I denne oppgaven skal du skrive et større program. For denne typen oppgaver kan det være mer praktisk å laste ned python og eventuelt en IDE (Et område man programmerer i på sin egen maskin). Ta derfor en kikk [her](https://docs.google.com/document/d/17tS0maWyzORUsIjmCVEszfqrl2X4By-Cy2Sw3ENG5lA/edit?usp=sharing) før du begynner. Det er fortsatt mulig å gjøre oppgaven i Jupyter dersom du ikke ønsker å jobbe lokalt, selv om det ikke er anbefalt.**\n", + " \n", + "I denne oppgaven skal vi først lage et sudoku-spill (før vi lager en sudoku-løser om noen år). Om du ikke kjenner reglene til sudoku kan du lese deg opp på de selv [her](https://no.wikipedia.org/wiki/Sudoku). Del 1 tar seg av å lage et spillbart sudoku-brett.\n", + "\n", + "Du står fritt til å bygge opp brettet slik som du vil, men brettet skal oppfylle følgende krav:\n", + "\n", + "* Brukeren skal kunne skrive inn et tall i en valgfri celle. Dersom tallet ikke er gyldig, dvs. ikke mellom 1 og 9, skal en feilmelding skrives ut.\n", + "* Brukeren skal ikke kunne fylle inn et tall som allerede finnes i den samme raden, kolonnen eller kvadratet.\n", + "* Brukeren skal kunne slette et tall fra en celle.\n", + "* Hver gang brukeren fyller inn eller sletter et tall skal det nye brettet skrives ut på en fin måte. Et eksempel kan være som vist under (tallene over og ved siden av brettet angir her henholdsvis kolonne- og radnummer).\n", + "* Brukeren skal kunne laste inn et brett fra en tekstfil.\n", + "* Et halvutfylt brett skal kunne lagres til fil, slik at man kan fullføre det senere.\n", + "* Spillet skal skrive ut en hyggelig gratulasjonsmelding dersom man har klart brettet.\n", + "* Alt skal utføres gjennom et brukervennlig grensesnitt. Det vil si at brukeren ikke skal trenge å kalle på funksjonene selv, men at alt gjøres via input eller ved å lese fra/skrive til fil.\n", + "\n", + "Eksempel på brett:\n", + ">```python\n", + " 0 1 2 3 4 5 6 7 8 \n", + " +-------+-------+-------+\n", + "0 | 0 0 6 | 9 0 5 | 0 1 0 |\n", + "1 | 9 7 0 | 0 1 2 | 3 0 5 |\n", + "2 | 0 2 0 | 0 0 4 | 8 6 0 |\n", + " +-------+-------+-------+\n", + "3 | 5 0 3 | 8 0 0 | 0 2 0 |\n", + "4 | 0 0 0 | 0 0 0 | 0 0 0 |\n", + "5 | 0 8 0 | 0 0 1 | 9 0 7 |\n", + " +-------+-------+-------+\n", + "6 | 0 5 4 | 1 0 0 | 0 7 0 |\n", + "7 | 2 0 7 | 4 5 0 | 0 9 3 |\n", + "8 | 0 6 0 | 7 0 3 | 1 0 0 |\n", + " +-------+-------+-------+\n", + "```" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#skriv koden din her" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Assignments/Assignment08/_Assignment08.ipynb b/Assignments/Assignment08/_Assignment08.ipynb new file mode 100644 index 0000000..a5a8f8f --- /dev/null +++ b/Assignments/Assignment08/_Assignment08.ipynb @@ -0,0 +1,68 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "deletable": false, + "editable": false, + "run_control": { + "frozen": true + } + }, + "source": [ + "# Assignment 8\n", + "\n", + "**Learning goals:**\n", + "\n", + "- Recursion\n", + "- Adaptive Simpson's method\n", + "- Large, complex coding tasks\n", + "\n", + "**Starting Out with Python:**\n", + "\n", + "- Ch. 12: Recursion\n", + " \n", + "\n", + "## Approval\n", + "\n", + "See blackboard for delivery and demonstration deadline. Remember that you have to demonstrate to your learning assistant (studass) in person in order to get it approved.\n", + "\n", + "**To get this assignment approved you need to do the mandatory task for TDT4127, and at least one other task (or summer 2019 exam).** \n", + "\n", + "**Note: If you do two other tasks completely, or complete the whole chess task correctly, this will account for *two* approved assignments**. \n", + "\n", + "**Note 2:** The TDT4127 Summer 2019 exam counts for one task, similar to Recursion, Sudoku or Chess. It can be found in blackboard under \"Tidligere eksamensoppgaver / Previous exams\". It is only available in Norwegian.\n", + "\n", + "Tasks that are a little extra difficult are marked with a star. Tasks that go beyond what has been lectured are marked with two stars. Tasks translated to english are marked with (ENG).\n", + "\n", + "Task | Theme | Difficulty | TDT4127 \n", + "--- | --- | --- | ---\n", + "[Adative Simpson's Rule(ENG)](AdaptiveSimpson.ipynb) | Recursion, Numerical Methods | - | Mandatory\n", + "[Rekursjon](Rekursjon.ipynb) , [Recursion(ENG)](Rekursjon(ENG).ipynb) | Recursion, Algorithms| - |\n", + "[Sudoku](Sudoku.ipynb) , [Sudoku(ENG)](Sudoku(ENG).ipynb) |Repetition, Complex problems| - |\n", + "[Sjakk](Sjakk.ipynb) , [Chess(ENG)](Sjakk(ENG).ipynb)|Repetition, Complex problems| |" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Assignments/Assignment08/alice_in_wonderland.txt b/Assignments/Assignment08/alice_in_wonderland.txt new file mode 100644 index 0000000..4005a1c --- /dev/null +++ b/Assignments/Assignment08/alice_in_wonderland.txt @@ -0,0 +1,3600 @@ +Alice's Adventures in Wonderland + + ALICE'S ADVENTURES IN WONDERLAND + + Lewis Carroll + + THE MILLENNIUM FULCRUM EDITION 3.0 + + + + + CHAPTER I + + Down the Rabbit-Hole + + + Alice was beginning to get very tired of sitting by her sister +on the bank, and of having nothing to do: once or twice she had +peeped into the book her sister was reading, but it had no +pictures or conversations in it, `and what is the use of a book,' +thought Alice `without pictures or conversation?' + + So she was considering in her own mind (as well as she could, +for the hot day made her feel very sleepy and stupid), whether +the pleasure of making a daisy-chain would be worth the trouble +of getting up and picking the daisies, when suddenly a White +Rabbit with pink eyes ran close by her. + + There was nothing so VERY remarkable in that; nor did Alice +think it so VERY much out of the way to hear the Rabbit say to +itself, `Oh dear! Oh dear! I shall be late!' (when she thought +it over afterwards, it occurred to her that she ought to have +wondered at this, but at the time it all seemed quite natural); +but when the Rabbit actually TOOK A WATCH OUT OF ITS WAISTCOAT- +POCKET, and looked at it, and then hurried on, Alice started to +her feet, for it flashed across her mind that she had never +before seen a rabbit with either a waistcoat-pocket, or a watch to +take out of it, and burning with curiosity, she ran across the +field after it, and fortunately was just in time to see it pop +down a large rabbit-hole under the hedge. + + In another moment down went Alice after it, never once +considering how in the world she was to get out again. + + The rabbit-hole went straight on like a tunnel for some way, +and then dipped suddenly down, so suddenly that Alice had not a +moment to think about stopping herself before she found herself +falling down a very deep well. + + Either the well was very deep, or she fell very slowly, for she +had plenty of time as she went down to look about her and to +wonder what was going to happen next. First, she tried to look +down and make out what she was coming to, but it was too dark to +see anything; then she looked at the sides of the well, and +noticed that they were filled with cupboards and book-shelves; +here and there she saw maps and pictures hung upon pegs. She +took down a jar from one of the shelves as she passed; it was +labelled `ORANGE MARMALADE', but to her great disappointment it +was empty: she did not like to drop the jar for fear of killing +somebody, so managed to put it into one of the cupboards as she +fell past it. + + `Well!' thought Alice to herself, `after such a fall as this, I +shall think nothing of tumbling down stairs! How brave they'll +all think me at home! Why, I wouldn't say anything about it, +even if I fell off the top of the house!' (Which was very likely +true.) + + Down, down, down. Would the fall NEVER come to an end! `I +wonder how many miles I've fallen by this time?' she said aloud. +`I must be getting somewhere near the centre of the earth. Let +me see: that would be four thousand miles down, I think--' (for, +you see, Alice had learnt several things of this sort in her +lessons in the schoolroom, and though this was not a VERY good +opportunity for showing off her knowledge, as there was no one to +listen to her, still it was good practice to say it over) `--yes, +that's about the right distance--but then I wonder what Latitude +or Longitude I've got to?' (Alice had no idea what Latitude was, +or Longitude either, but thought they were nice grand words to +say.) + + Presently she began again. `I wonder if I shall fall right +THROUGH the earth! How funny it'll seem to come out among the +people that walk with their heads downward! The Antipathies, I +think--' (she was rather glad there WAS no one listening, this +time, as it didn't sound at all the right word) `--but I shall +have to ask them what the name of the country is, you know. +Please, Ma'am, is this New Zealand or Australia?' (and she tried +to curtsey as she spoke--fancy CURTSEYING as you're falling +through the air! Do you think you could manage it?) `And what +an ignorant little girl she'll think me for asking! No, it'll +never do to ask: perhaps I shall see it written up somewhere.' + + Down, down, down. There was nothing else to do, so Alice soon +began talking again. `Dinah'll miss me very much to-night, I +should think!' (Dinah was the cat.) `I hope they'll remember +her saucer of milk at tea-time. Dinah my dear! I wish you were +down here with me! There are no mice in the air, I'm afraid, but +you might catch a bat, and that's very like a mouse, you know. +But do cats eat bats, I wonder?' And here Alice began to get +rather sleepy, and went on saying to herself, in a dreamy sort of +way, `Do cats eat bats? Do cats eat bats?' and sometimes, `Do +bats eat cats?' for, you see, as she couldn't answer either +question, it didn't much matter which way she put it. She felt +that she was dozing off, and had just begun to dream that she +was walking hand in hand with Dinah, and saying to her very +earnestly, `Now, Dinah, tell me the truth: did you ever eat a +bat?' when suddenly, thump! thump! down she came upon a heap of +sticks and dry leaves, and the fall was over. + + Alice was not a bit hurt, and she jumped up on to her feet in a +moment: she looked up, but it was all dark overhead; before her +was another long passage, and the White Rabbit was still in +sight, hurrying down it. There was not a moment to be lost: +away went Alice like the wind, and was just in time to hear it +say, as it turned a corner, `Oh my ears and whiskers, how late +it's getting!' She was close behind it when she turned the +corner, but the Rabbit was no longer to be seen: she found +herself in a long, low hall, which was lit up by a row of lamps +hanging from the roof. + + There were doors all round the hall, but they were all locked; +and when Alice had been all the way down one side and up the +other, trying every door, she walked sadly down the middle, +wondering how she was ever to get out again. + + Suddenly she came upon a little three-legged table, all made of +solid glass; there was nothing on it except a tiny golden key, +and Alice's first thought was that it might belong to one of the +doors of the hall; but, alas! either the locks were too large, or +the key was too small, but at any rate it would not open any of +them. However, on the second time round, she came upon a low +curtain she had not noticed before, and behind it was a little +door about fifteen inches high: she tried the little golden key +in the lock, and to her great delight it fitted! + + Alice opened the door and found that it led into a small +passage, not much larger than a rat-hole: she knelt down and +looked along the passage into the loveliest garden you ever saw. +How she longed to get out of that dark hall, and wander about +among those beds of bright flowers and those cool fountains, but +she could not even get her head through the doorway; `and even if +my head would go through,' thought poor Alice, `it would be of +very little use without my shoulders. Oh, how I wish +I could shut up like a telescope! I think I could, if I only +know how to begin.' For, you see, so many out-of-the-way things +had happened lately, that Alice had begun to think that very few +things indeed were really impossible. + + There seemed to be no use in waiting by the little door, so she +went back to the table, half hoping she might find another key on +it, or at any rate a book of rules for shutting people up like +telescopes: this time she found a little bottle on it, (`which +certainly was not here before,' said Alice,) and round the neck +of the bottle was a paper label, with the words `DRINK ME' +beautifully printed on it in large letters. + + It was all very well to say `Drink me,' but the wise little +Alice was not going to do THAT in a hurry. `No, I'll look +first,' she said, `and see whether it's marked "poison" or not'; +for she had read several nice little histories about children who +had got burnt, and eaten up by wild beasts and other unpleasant +things, all because they WOULD not remember the simple rules +their friends had taught them: such as, that a red-hot poker +will burn you if you hold it too long; and that if you cut your +finger VERY deeply with a knife, it usually bleeds; and she had +never forgotten that, if you drink much from a bottle marked +`poison,' it is almost certain to disagree with you, sooner or +later. + + However, this bottle was NOT marked `poison,' so Alice ventured +to taste it, and finding it very nice, (it had, in fact, a sort +of mixed flavour of cherry-tart, custard, pine-apple, roast +turkey, toffee, and hot buttered toast,) she very soon finished +it off. + + * * * * * * * + + * * * * * * + + * * * * * * * + + `What a curious feeling!' said Alice; `I must be shutting up +like a telescope.' + + And so it was indeed: she was now only ten inches high, and +her face brightened up at the thought that she was now the right +size for going through the little door into that lovely garden. +First, however, she waited for a few minutes to see if she was +going to shrink any further: she felt a little nervous about +this; `for it might end, you know,' said Alice to herself, `in my +going out altogether, like a candle. I wonder what I should be +like then?' And she tried to fancy what the flame of a candle is +like after the candle is blown out, for she could not remember +ever having seen such a thing. + + After a while, finding that nothing more happened, she decided +on going into the garden at once; but, alas for poor Alice! +when she got to the door, she found she had forgotten the +little golden key, and when she went back to the table for it, +she found she could not possibly reach it: she could see it +quite plainly through the glass, and she tried her best to climb +up one of the legs of the table, but it was too slippery; +and when she had tired herself out with trying, +the poor little thing sat down and cried. + + `Come, there's no use in crying like that!' said Alice to +herself, rather sharply; `I advise you to leave off this minute!' +She generally gave herself very good advice, (though she very +seldom followed it), and sometimes she scolded herself so +severely as to bring tears into her eyes; and once she remembered +trying to box her own ears for having cheated herself in a game +of croquet she was playing against herself, for this curious +child was very fond of pretending to be two people. `But it's no +use now,' thought poor Alice, `to pretend to be two people! Why, +there's hardly enough of me left to make ONE respectable +person!' + + Soon her eye fell on a little glass box that was lying under +the table: she opened it, and found in it a very small cake, on +which the words `EAT ME' were beautifully marked in currants. +`Well, I'll eat it,' said Alice, `and if it makes me grow larger, +I can reach the key; and if it makes me grow smaller, I can creep +under the door; so either way I'll get into the garden, and I +don't care which happens!' + + She ate a little bit, and said anxiously to herself, `Which +way? Which way?', holding her hand on the top of her head to +feel which way it was growing, and she was quite surprised to +find that she remained the same size: to be sure, this generally +happens when one eats cake, but Alice had got so much into the +way of expecting nothing but out-of-the-way things to happen, +that it seemed quite dull and stupid for life to go on in the +common way. + + So she set to work, and very soon finished off the cake. + + * * * * * * * + + * * * * * * + + * * * * * * * + + + + + CHAPTER II + + The Pool of Tears + + + `Curiouser and curiouser!' cried Alice (she was so much +surprised, that for the moment she quite forgot how to speak good +English); `now I'm opening out like the largest telescope that +ever was! Good-bye, feet!' (for when she looked down at her +feet, they seemed to be almost out of sight, they were getting so +far off). `Oh, my poor little feet, I wonder who will put on +your shoes and stockings for you now, dears? I'm sure _I_ shan't +be able! I shall be a great deal too far off to trouble myself +about you: you must manage the best way you can; --but I must be +kind to them,' thought Alice, `or perhaps they won't walk the +way I want to go! Let me see: I'll give them a new pair of +boots every Christmas.' + + And she went on planning to herself how she would manage it. +`They must go by the carrier,' she thought; `and how funny it'll +seem, sending presents to one's own feet! And how odd the +directions will look! + + ALICE'S RIGHT FOOT, ESQ. + HEARTHRUG, + NEAR THE FENDER, + (WITH ALICE'S LOVE). + +Oh dear, what nonsense I'm talking!' + + Just then her head struck against the roof of the hall: in +fact she was now more than nine feet high, and she at once took +up the little golden key and hurried off to the garden door. + + Poor Alice! It was as much as she could do, lying down on one +side, to look through into the garden with one eye; but to get +through was more hopeless than ever: she sat down and began to +cry again. + + `You ought to be ashamed of yourself,' said Alice, `a great +girl like you,' (she might well say this), `to go on crying in +this way! Stop this moment, I tell you!' But she went on all +the same, shedding gallons of tears, until there was a large pool +all round her, about four inches deep and reaching half down the +hall. + + After a time she heard a little pattering of feet in the +distance, and she hastily dried her eyes to see what was coming. +It was the White Rabbit returning, splendidly dressed, with a +pair of white kid gloves in one hand and a large fan in the +other: he came trotting along in a great hurry, muttering to +himself as he came, `Oh! the Duchess, the Duchess! Oh! won't she +be savage if I've kept her waiting!' Alice felt so desperate +that she was ready to ask help of any one; so, when the Rabbit +came near her, she began, in a low, timid voice, `If you please, +sir--' The Rabbit started violently, dropped the white kid +gloves and the fan, and skurried away into the darkness as hard +as he could go. + + Alice took up the fan and gloves, and, as the hall was very +hot, she kept fanning herself all the time she went on talking: +`Dear, dear! How queer everything is to-day! And yesterday +things went on just as usual. I wonder if I've been changed in +the night? Let me think: was I the same when I got up this +morning? I almost think I can remember feeling a little +different. But if I'm not the same, the next question is, Who in +the world am I? Ah, THAT'S the great puzzle!' And she began +thinking over all the children she knew that were of the same age +as herself, to see if she could have been changed for any of +them. + + `I'm sure I'm not Ada,' she said, `for her hair goes in such +long ringlets, and mine doesn't go in ringlets at all; and I'm +sure I can't be Mabel, for I know all sorts of things, and she, +oh! she knows such a very little! Besides, SHE'S she, and I'm I, +and--oh dear, how puzzling it all is! I'll try if I know all the +things I used to know. Let me see: four times five is twelve, +and four times six is thirteen, and four times seven is--oh dear! +I shall never get to twenty at that rate! However, the +Multiplication Table doesn't signify: let's try Geography. +London is the capital of Paris, and Paris is the capital of Rome, +and Rome--no, THAT'S all wrong, I'm certain! I must have been +changed for Mabel! I'll try and say "How doth the little--"' +and she crossed her hands on her lap as if she were saying lessons, +and began to repeat it, but her voice sounded hoarse and +strange, and the words did not come the same as they used to do:-- + + `How doth the little crocodile + Improve his shining tail, + And pour the waters of the Nile + On every golden scale! + + `How cheerfully he seems to grin, + How neatly spread his claws, + And welcome little fishes in + With gently smiling jaws!' + + `I'm sure those are not the right words,' said poor Alice, and +her eyes filled with tears again as she went on, `I must be Mabel +after all, and I shall have to go and live in that poky little +house, and have next to no toys to play with, and oh! ever so +many lessons to learn! No, I've made up my mind about it; if I'm +Mabel, I'll stay down here! It'll be no use their putting their +heads down and saying "Come up again, dear!" I shall only look +up and say "Who am I then? Tell me that first, and then, if I +like being that person, I'll come up: if not, I'll stay down +here till I'm somebody else"--but, oh dear!' cried Alice, with a +sudden burst of tears, `I do wish they WOULD put their heads +down! I am so VERY tired of being all alone here!' + + As she said this she looked down at her hands, and was +surprised to see that she had put on one of the Rabbit's little +white kid gloves while she was talking. `How CAN I have done +that?' she thought. `I must be growing small again.' She got up +and went to the table to measure herself by it, and found that, +as nearly as she could guess, she was now about two feet high, +and was going on shrinking rapidly: she soon found out that the +cause of this was the fan she was holding, and she dropped it +hastily, just in time to avoid shrinking away altogether. + +`That WAS a narrow escape!' said Alice, a good deal frightened at +the sudden change, but very glad to find herself still in +existence; `and now for the garden!' and she ran with all speed +back to the little door: but, alas! the little door was shut +again, and the little golden key was lying on the glass table as +before, `and things are worse than ever,' thought the poor child, +`for I never was so small as this before, never! And I declare +it's too bad, that it is!' + + As she said these words her foot slipped, and in another +moment, splash! she was up to her chin in salt water. Her first +idea was that she had somehow fallen into the sea, `and in that +case I can go back by railway,' she said to herself. (Alice had +been to the seaside once in her life, and had come to the general +conclusion, that wherever you go to on the English coast you find +a number of bathing machines in the sea, some children digging in +the sand with wooden spades, then a row of lodging houses, and +behind them a railway station.) However, she soon made out that +she was in the pool of tears which she had wept when she was nine +feet high. + + `I wish I hadn't cried so much!' said Alice, as she swam about, +trying to find her way out. `I shall be punished for it now, I +suppose, by being drowned in my own tears! That WILL be a queer +thing, to be sure! However, everything is queer to-day.' + + Just then she heard something splashing about in the pool a +little way off, and she swam nearer to make out what it was: at +first she thought it must be a walrus or hippopotamus, but then +she remembered how small she was now, and she soon made out that +it was only a mouse that had slipped in like herself. + + `Would it be of any use, now,' thought Alice, `to speak to this +mouse? Everything is so out-of-the-way down here, that I should +think very likely it can talk: at any rate, there's no harm in +trying.' So she began: `O Mouse, do you know the way out of +this pool? I am very tired of swimming about here, O Mouse!' +(Alice thought this must be the right way of speaking to a mouse: +she had never done such a thing before, but she remembered having +seen in her brother's Latin Grammar, `A mouse--of a mouse--to a +mouse--a mouse--O mouse!') The Mouse looked at her rather +inquisitively, and seemed to her to wink with one of its little +eyes, but it said nothing. + + `Perhaps it doesn't understand English,' thought Alice; `I +daresay it's a French mouse, come over with William the +Conqueror.' (For, with all her knowledge of history, Alice had +no very clear notion how long ago anything had happened.) So she +began again: `Ou est ma chatte?' which was the first sentence in +her French lesson-book. The Mouse gave a sudden leap out of the +water, and seemed to quiver all over with fright. `Oh, I beg +your pardon!' cried Alice hastily, afraid that she had hurt the +poor animal's feelings. `I quite forgot you didn't like cats.' + + `Not like cats!' cried the Mouse, in a shrill, passionate +voice. `Would YOU like cats if you were me?' + + `Well, perhaps not,' said Alice in a soothing tone: `don't be +angry about it. And yet I wish I could show you our cat Dinah: +I think you'd take a fancy to cats if you could only see her. +She is such a dear quiet thing,' Alice went on, half to herself, +as she swam lazily about in the pool, `and she sits purring so +nicely by the fire, licking her paws and washing her face--and +she is such a nice soft thing to nurse--and she's such a capital +one for catching mice--oh, I beg your pardon!' cried Alice again, +for this time the Mouse was bristling all over, and she felt +certain it must be really offended. `We won't talk about her any +more if you'd rather not.' + + `We indeed!' cried the Mouse, who was trembling down to the end +of his tail. `As if I would talk on such a subject! Our family +always HATED cats: nasty, low, vulgar things! Don't let me hear +the name again!' + + `I won't indeed!' said Alice, in a great hurry to change the +subject of conversation. `Are you--are you fond--of--of dogs?' +The Mouse did not answer, so Alice went on eagerly: `There is +such a nice little dog near our house I should like to show you! +A little bright-eyed terrier, you know, with oh, such long curly +brown hair! And it'll fetch things when you throw them, and +it'll sit up and beg for its dinner, and all sorts of things--I +can't remember half of them--and it belongs to a farmer, you +know, and he says it's so useful, it's worth a hundred pounds! +He says it kills all the rats and--oh dear!' cried Alice in a +sorrowful tone, `I'm afraid I've offended it again!' For the +Mouse was swimming away from her as hard as it could go, and +making quite a commotion in the pool as it went. + + So she called softly after it, `Mouse dear! Do come back +again, and we won't talk about cats or dogs either, if you don't +like them!' When the Mouse heard this, it turned round and swam +slowly back to her: its face was quite pale (with passion, Alice +thought), and it said in a low trembling voice, `Let us get to +the shore, and then I'll tell you my history, and you'll +understand why it is I hate cats and dogs.' + + It was high time to go, for the pool was getting quite crowded +with the birds and animals that had fallen into it: there were a +Duck and a Dodo, a Lory and an Eaglet, and several other curious +creatures. Alice led the way, and the whole party swam to the +shore. + + + + CHAPTER III + + A Caucus-Race and a Long Tale + + + They were indeed a queer-looking party that assembled on the +bank--the birds with draggled feathers, the animals with their +fur clinging close to them, and all dripping wet, cross, and +uncomfortable. + + The first question of course was, how to get dry again: they +had a consultation about this, and after a few minutes it seemed +quite natural to Alice to find herself talking familiarly with +them, as if she had known them all her life. Indeed, she had +quite a long argument with the Lory, who at last turned sulky, +and would only say, `I am older than you, and must know better'; +and this Alice would not allow without knowing how old it was, +and, as the Lory positively refused to tell its age, there was no +more to be said. + + At last the Mouse, who seemed to be a person of authority among +them, called out, `Sit down, all of you, and listen to me! I'LL +soon make you dry enough!' They all sat down at once, in a large +ring, with the Mouse in the middle. Alice kept her eyes +anxiously fixed on it, for she felt sure she would catch a bad +cold if she did not get dry very soon. + + `Ahem!' said the Mouse with an important air, `are you all ready? +This is the driest thing I know. Silence all round, if you please! +"William the Conqueror, whose cause was favoured by the pope, was +soon submitted to by the English, who wanted leaders, and had been +of late much accustomed to usurpation and conquest. Edwin and +Morcar, the earls of Mercia and Northumbria--"' + + `Ugh!' said the Lory, with a shiver. + + `I beg your pardon!' said the Mouse, frowning, but very +politely: `Did you speak?' + + `Not I!' said the Lory hastily. + + `I thought you did,' said the Mouse. `--I proceed. "Edwin and +Morcar, the earls of Mercia and Northumbria, declared for him: +and even Stigand, the patriotic archbishop of Canterbury, found +it advisable--"' + + `Found WHAT?' said the Duck. + + `Found IT,' the Mouse replied rather crossly: `of course you +know what "it" means.' + + `I know what "it" means well enough, when I find a thing,' said +the Duck: `it's generally a frog or a worm. The question is, +what did the archbishop find?' + + The Mouse did not notice this question, but hurriedly went on, +`"--found it advisable to go with Edgar Atheling to meet William +and offer him the crown. William's conduct at first was +moderate. But the insolence of his Normans--" How are you +getting on now, my dear?' it continued, turning to Alice as it +spoke. + + `As wet as ever,' said Alice in a melancholy tone: `it doesn't +seem to dry me at all.' + + `In that case,' said the Dodo solemnly, rising to its feet, `I +move that the meeting adjourn, for the immediate adoption of more +energetic remedies--' + + `Speak English!' said the Eaglet. `I don't know the meaning of +half those long words, and, what's more, I don't believe you do +either!' And the Eaglet bent down its head to hide a smile: +some of the other birds tittered audibly. + + `What I was going to say,' said the Dodo in an offended tone, +`was, that the best thing to get us dry would be a Caucus-race.' + + `What IS a Caucus-race?' said Alice; not that she wanted much +to know, but the Dodo had paused as if it thought that SOMEBODY +ought to speak, and no one else seemed inclined to say anything. + + `Why,' said the Dodo, `the best way to explain it is to do it.' +(And, as you might like to try the thing yourself, some winter +day, I will tell you how the Dodo managed it.) + + First it marked out a race-course, in a sort of circle, (`the +exact shape doesn't matter,' it said,) and then all the party +were placed along the course, here and there. There was no `One, +two, three, and away,' but they began running when they liked, +and left off when they liked, so that it was not easy to know +when the race was over. However, when they had been running half +an hour or so, and were quite dry again, the Dodo suddenly called +out `The race is over!' and they all crowded round it, panting, +and asking, `But who has won?' + + This question the Dodo could not answer without a great deal of +thought, and it sat for a long time with one finger pressed upon +its forehead (the position in which you usually see Shakespeare, +in the pictures of him), while the rest waited in silence. At +last the Dodo said, `EVERYBODY has won, and all must have +prizes.' + + `But who is to give the prizes?' quite a chorus of voices +asked. + + `Why, SHE, of course,' said the Dodo, pointing to Alice with +one finger; and the whole party at once crowded round her, +calling out in a confused way, `Prizes! Prizes!' + + Alice had no idea what to do, and in despair she put her hand +in her pocket, and pulled out a box of comfits, (luckily the salt +water had not got into it), and handed them round as prizes. +There was exactly one a-piece all round. + + `But she must have a prize herself, you know,' said the Mouse. + + `Of course,' the Dodo replied very gravely. `What else have +you got in your pocket?' he went on, turning to Alice. + + `Only a thimble,' said Alice sadly. + + `Hand it over here,' said the Dodo. + + Then they all crowded round her once more, while the Dodo +solemnly presented the thimble, saying `We beg your acceptance of +this elegant thimble'; and, when it had finished this short +speech, they all cheered. + + Alice thought the whole thing very absurd, but they all looked +so grave that she did not dare to laugh; and, as she could not +think of anything to say, she simply bowed, and took the thimble, +looking as solemn as she could. + + The next thing was to eat the comfits: this caused some noise +and confusion, as the large birds complained that they could not +taste theirs, and the small ones choked and had to be patted on +the back. However, it was over at last, and they sat down again +in a ring, and begged the Mouse to tell them something more. + + `You promised to tell me your history, you know,' said Alice, +`and why it is you hate--C and D,' she added in a whisper, half +afraid that it would be offended again. + + `Mine is a long and a sad tale!' said the Mouse, turning to +Alice, and sighing. + + `It IS a long tail, certainly,' said Alice, looking down with +wonder at the Mouse's tail; `but why do you call it sad?' And +she kept on puzzling about it while the Mouse was speaking, so +that her idea of the tale was something like this:-- + + `Fury said to a + mouse, That he + met in the + house, + "Let us + both go to + law: I will + prosecute + YOU. --Come, + I'll take no + denial; We + must have a + trial: For + really this + morning I've + nothing + to do." + Said the + mouse to the + cur, "Such + a trial, + dear Sir, + With + no jury + or judge, + would be + wasting + our + breath." + "I'll be + judge, I'll + be jury," + Said + cunning + old Fury: + "I'll + try the + whole + cause, + and + condemn + you + to + death."' + + + `You are not attending!' said the Mouse to Alice severely. +`What are you thinking of?' + + `I beg your pardon,' said Alice very humbly: `you had got to +the fifth bend, I think?' + + `I had NOT!' cried the Mouse, sharply and very angrily. + + `A knot!' said Alice, always ready to make herself useful, and +looking anxiously about her. `Oh, do let me help to undo it!' + + `I shall do nothing of the sort,' said the Mouse, getting up +and walking away. `You insult me by talking such nonsense!' + + `I didn't mean it!' pleaded poor Alice. `But you're so easily +offended, you know!' + + The Mouse only growled in reply. + + `Please come back and finish your story!' Alice called after +it; and the others all joined in chorus, `Yes, please do!' but +the Mouse only shook its head impatiently, and walked a little +quicker. + + `What a pity it wouldn't stay!' sighed the Lory, as soon as it +was quite out of sight; and an old Crab took the opportunity of +saying to her daughter `Ah, my dear! Let this be a lesson to you +never to lose YOUR temper!' `Hold your tongue, Ma!' said the +young Crab, a little snappishly. `You're enough to try the +patience of an oyster!' + + `I wish I had our Dinah here, I know I do!' said Alice aloud, +addressing nobody in particular. `She'd soon fetch it back!' + + `And who is Dinah, if I might venture to ask the question?' +said the Lory. + + Alice replied eagerly, for she was always ready to talk about +her pet: `Dinah's our cat. And she's such a capital one for +catching mice you can't think! And oh, I wish you could see her +after the birds! Why, she'll eat a little bird as soon as look +at it!' + + This speech caused a remarkable sensation among the party. +Some of the birds hurried off at once: one old Magpie began +wrapping itself up very carefully, remarking, `I really must be +getting home; the night-air doesn't suit my throat!' and a Canary +called out in a trembling voice to its children, `Come away, my +dears! It's high time you were all in bed!' On various pretexts +they all moved off, and Alice was soon left alone. + + `I wish I hadn't mentioned Dinah!' she said to herself in a +melancholy tone. `Nobody seems to like her, down here, and I'm +sure she's the best cat in the world! Oh, my dear Dinah! I +wonder if I shall ever see you any more!' And here poor Alice +began to cry again, for she felt very lonely and low-spirited. +In a little while, however, she again heard a little pattering of +footsteps in the distance, and she looked up eagerly, half hoping +that the Mouse had changed his mind, and was coming back to +finish his story. + + + + CHAPTER IV + + The Rabbit Sends in a Little Bill + + + It was the White Rabbit, trotting slowly back again, and +looking anxiously about as it went, as if it had lost something; +and she heard it muttering to itself `The Duchess! The Duchess! +Oh my dear paws! Oh my fur and whiskers! She'll get me +executed, as sure as ferrets are ferrets! Where CAN I have +dropped them, I wonder?' Alice guessed in a moment that it was +looking for the fan and the pair of white kid gloves, and she +very good-naturedly began hunting about for them, but they were +nowhere to be seen--everything seemed to have changed since her +swim in the pool, and the great hall, with the glass table and +the little door, had vanished completely. + + Very soon the Rabbit noticed Alice, as she went hunting about, +and called out to her in an angry tone, `Why, Mary Ann, what ARE +you doing out here? Run home this moment, and fetch me a pair of +gloves and a fan! Quick, now!' And Alice was so much frightened +that she ran off at once in the direction it pointed to, without +trying to explain the mistake it had made. + + `He took me for his housemaid,' she said to herself as she ran. +`How surprised he'll be when he finds out who I am! But I'd +better take him his fan and gloves--that is, if I can find them.' +As she said this, she came upon a neat little house, on the door +of which was a bright brass plate with the name `W. RABBIT' +engraved upon it. She went in without knocking, and hurried +upstairs, in great fear lest she should meet the real Mary Ann, +and be turned out of the house before she had found the fan and +gloves. + + `How queer it seems,' Alice said to herself, `to be going +messages for a rabbit! I suppose Dinah'll be sending me on +messages next!' And she began fancying the sort of thing that +would happen: `"Miss Alice! Come here directly, and get ready +for your walk!" "Coming in a minute, nurse! But I've got to see +that the mouse doesn't get out." Only I don't think,' Alice went +on, `that they'd let Dinah stop in the house if it began ordering +people about like that!' + + By this time she had found her way into a tidy little room with +a table in the window, and on it (as she had hoped) a fan and two +or three pairs of tiny white kid gloves: she took up the fan and +a pair of the gloves, and was just going to leave the room, when +her eye fell upon a little bottle that stood near the looking- +glass. There was no label this time with the words `DRINK ME,' +but nevertheless she uncorked it and put it to her lips. `I know +SOMETHING interesting is sure to happen,' she said to herself, +`whenever I eat or drink anything; so I'll just see what this +bottle does. I do hope it'll make me grow large again, for +really I'm quite tired of being such a tiny little thing!' + + It did so indeed, and much sooner than she had expected: +before she had drunk half the bottle, she found her head pressing +against the ceiling, and had to stoop to save her neck from being +broken. She hastily put down the bottle, saying to herself +`That's quite enough--I hope I shan't grow any more--As it is, I +can't get out at the door--I do wish I hadn't drunk quite so +much!' + + Alas! it was too late to wish that! She went on growing, and +growing, and very soon had to kneel down on the floor: in +another minute there was not even room for this, and she tried +the effect of lying down with one elbow against the door, and the +other arm curled round her head. Still she went on growing, and, +as a last resource, she put one arm out of the window, and one +foot up the chimney, and said to herself `Now I can do no more, +whatever happens. What WILL become of me?' + + Luckily for Alice, the little magic bottle had now had its full +effect, and she grew no larger: still it was very uncomfortable, +and, as there seemed to be no sort of chance of her ever getting +out of the room again, no wonder she felt unhappy. + + `It was much pleasanter at home,' thought poor Alice, `when one +wasn't always growing larger and smaller, and being ordered about +by mice and rabbits. I almost wish I hadn't gone down that +rabbit-hole--and yet--and yet--it's rather curious, you know, +this sort of life! I do wonder what CAN have happened to me! +When I used to read fairy-tales, I fancied that kind of thing +never happened, and now here I am in the middle of one! There +ought to be a book written about me, that there ought! And when +I grow up, I'll write one--but I'm grown up now,' she added in a +sorrowful tone; `at least there's no room to grow up any more +HERE.' + + `But then,' thought Alice, `shall I NEVER get any older than I +am now? That'll be a comfort, one way--never to be an old woman-- +but then--always to have lessons to learn! Oh, I shouldn't like THAT!' + + `Oh, you foolish Alice!' she answered herself. `How can you +learn lessons in here? Why, there's hardly room for YOU, and no +room at all for any lesson-books!' + + And so she went on, taking first one side and then the other, +and making quite a conversation of it altogether; but after a few +minutes she heard a voice outside, and stopped to listen. + + `Mary Ann! Mary Ann!' said the voice. `Fetch me my gloves +this moment!' Then came a little pattering of feet on the +stairs. Alice knew it was the Rabbit coming to look for her, and +she trembled till she shook the house, quite forgetting that she +was now about a thousand times as large as the Rabbit, and had no +reason to be afraid of it. + + Presently the Rabbit came up to the door, and tried to open it; +but, as the door opened inwards, and Alice's elbow was pressed +hard against it, that attempt proved a failure. Alice heard it +say to itself `Then I'll go round and get in at the window.' + + `THAT you won't' thought Alice, and, after waiting till she +fancied she heard the Rabbit just under the window, she suddenly +spread out her hand, and made a snatch in the air. She did not +get hold of anything, but she heard a little shriek and a fall, +and a crash of broken glass, from which she concluded that it was +just possible it had fallen into a cucumber-frame, or something +of the sort. + + Next came an angry voice--the Rabbit's--`Pat! Pat! Where are +you?' And then a voice she had never heard before, `Sure then +I'm here! Digging for apples, yer honour!' + + `Digging for apples, indeed!' said the Rabbit angrily. `Here! +Come and help me out of THIS!' (Sounds of more broken glass.) + + `Now tell me, Pat, what's that in the window?' + + `Sure, it's an arm, yer honour!' (He pronounced it `arrum.') + + `An arm, you goose! Who ever saw one that size? Why, it +fills the whole window!' + + `Sure, it does, yer honour: but it's an arm for all that.' + + `Well, it's got no business there, at any rate: go and take it +away!' + + There was a long silence after this, and Alice could only hear +whispers now and then; such as, `Sure, I don't like it, yer +honour, at all, at all!' `Do as I tell you, you coward!' and at +last she spread out her hand again, and made another snatch in +the air. This time there were TWO little shrieks, and more +sounds of broken glass. `What a number of cucumber-frames there +must be!' thought Alice. `I wonder what they'll do next! As for +pulling me out of the window, I only wish they COULD! I'm sure I +don't want to stay in here any longer!' + + She waited for some time without hearing anything more: at +last came a rumbling of little cartwheels, and the sound of a +good many voices all talking together: she made out the words: +`Where's the other ladder?--Why, I hadn't to bring but one; +Bill's got the other--Bill! fetch it here, lad!--Here, put 'em up +at this corner--No, tie 'em together first--they don't reach half +high enough yet--Oh! they'll do well enough; don't be particular-- +Here, Bill! catch hold of this rope--Will the roof bear?--Mind +that loose slate--Oh, it's coming down! Heads below!' (a loud +crash)--`Now, who did that?--It was Bill, I fancy--Who's to go +down the chimney?--Nay, I shan't! YOU do it!--That I won't, +then!--Bill's to go down--Here, Bill! the master says you're to +go down the chimney!' + + `Oh! So Bill's got to come down the chimney, has he?' said +Alice to herself. `Shy, they seem to put everything upon Bill! +I wouldn't be in Bill's place for a good deal: this fireplace is +narrow, to be sure; but I THINK I can kick a little!' + + She drew her foot as far down the chimney as she could, and +waited till she heard a little animal (she couldn't guess of what +sort it was) scratching and scrambling about in the chimney close +above her: then, saying to herself `This is Bill,' she gave one +sharp kick, and waited to see what would happen next. + + The first thing she heard was a general chorus of `There goes +Bill!' then the Rabbit's voice along--`Catch him, you by the +hedge!' then silence, and then another confusion of voices--`Hold +up his head--Brandy now--Don't choke him--How was it, old fellow? +What happened to you? Tell us all about it!' + + Last came a little feeble, squeaking voice, (`That's Bill,' +thought Alice,) `Well, I hardly know--No more, thank ye; I'm +better now--but I'm a deal too flustered to tell you--all I know +is, something comes at me like a Jack-in-the-box, and up I goes +like a sky-rocket!' + + `So you did, old fellow!' said the others. + + `We must burn the house down!' said the Rabbit's voice; and +Alice called out as loud as she could, `If you do. I'll set +Dinah at you!' + + There was a dead silence instantly, and Alice thought to +herself, `I wonder what they WILL do next! If they had any +sense, they'd take the roof off.' After a minute or two, they +began moving about again, and Alice heard the Rabbit say, `A +barrowful will do, to begin with.' + + `A barrowful of WHAT?' thought Alice; but she had not long to +doubt, for the next moment a shower of little pebbles came +rattling in at the window, and some of them hit her in the face. +`I'll put a stop to this,' she said to herself, and shouted out, +`You'd better not do that again!' which produced another dead +silence. + + Alice noticed with some surprise that the pebbles were all +turning into little cakes as they lay on the floor, and a bright +idea came into her head. `If I eat one of these cakes,' she +thought, `it's sure to make SOME change in my size; and as it +can't possibly make me larger, it must make me smaller, I +suppose.' + + So she swallowed one of the cakes, and was delighted to find +that she began shrinking directly. As soon as she was small +enough to get through the door, she ran out of the house, and +found quite a crowd of little animals and birds waiting outside. +The poor little Lizard, Bill, was in the middle, being held up by +two guinea-pigs, who were giving it something out of a bottle. +They all made a rush at Alice the moment she appeared; but she +ran off as hard as she could, and soon found herself safe in a +thick wood. + + `The first thing I've got to do,' said Alice to herself, as she +wandered about in the wood, `is to grow to my right size again; +and the second thing is to find my way into that lovely garden. +I think that will be the best plan.' + + It sounded an excellent plan, no doubt, and very neatly and +simply arranged; the only difficulty was, that she had not the +smallest idea how to set about it; and while she was peering +about anxiously among the trees, a little sharp bark just over +her head made her look up in a great hurry. + + An enormous puppy was looking down at her with large round +eyes, and feebly stretching out one paw, trying to touch her. +`Poor little thing!' said Alice, in a coaxing tone, and she tried +hard to whistle to it; but she was terribly frightened all the +time at the thought that it might be hungry, in which case it +would be very likely to eat her up in spite of all her coaxing. + + Hardly knowing what she did, she picked up a little bit of +stick, and held it out to the puppy; whereupon the puppy jumped +into the air off all its feet at once, with a yelp of delight, +and rushed at the stick, and made believe to worry it; then Alice +dodged behind a great thistle, to keep herself from being run +over; and the moment she appeared on the other side, the puppy +made another rush at the stick, and tumbled head over heels in +its hurry to get hold of it; then Alice, thinking it was very +like having a game of play with a cart-horse, and expecting every +moment to be trampled under its feet, ran round the thistle +again; then the puppy began a series of short charges at the +stick, running a very little way forwards each time and a long +way back, and barking hoarsely all the while, till at last it sat +down a good way off, panting, with its tongue hanging out of its +mouth, and its great eyes half shut. + + This seemed to Alice a good opportunity for making her escape; +so she set off at once, and ran till she was quite tired and out +of breath, and till the puppy's bark sounded quite faint in the +distance. + + `And yet what a dear little puppy it was!' said Alice, as she +leant against a buttercup to rest herself, and fanned herself +with one of the leaves: `I should have liked teaching it tricks +very much, if--if I'd only been the right size to do it! Oh +dear! I'd nearly forgotten that I've got to grow up again! Let +me see--how IS it to be managed? I suppose I ought to eat or +drink something or other; but the great question is, what?' + + The great question certainly was, what? Alice looked all round +her at the flowers and the blades of grass, but she did not see +anything that looked like the right thing to eat or drink under +the circumstances. There was a large mushroom growing near her, +about the same height as herself; and when she had looked under +it, and on both sides of it, and behind it, it occurred to her +that she might as well look and see what was on the top of it. + + She stretched herself up on tiptoe, and peeped over the edge of +the mushroom, and her eyes immediately met those of a large +caterpillar, that was sitting on the top with its arms folded, +quietly smoking a long hookah, and taking not the smallest notice +of her or of anything else. + + + + CHAPTER V + + Advice from a Caterpillar + + + The Caterpillar and Alice looked at each other for some time in +silence: at last the Caterpillar took the hookah out of its +mouth, and addressed her in a languid, sleepy voice. + + `Who are YOU?' said the Caterpillar. + + This was not an encouraging opening for a conversation. Alice +replied, rather shyly, `I--I hardly know, sir, just at present-- +at least I know who I WAS when I got up this morning, but I think +I must have been changed several times since then.' + + `What do you mean by that?' said the Caterpillar sternly. +`Explain yourself!' + + `I can't explain MYSELF, I'm afraid, sir' said Alice, `because +I'm not myself, you see.' + + `I don't see,' said the Caterpillar. + + `I'm afraid I can't put it more clearly,' Alice replied very +politely, `for I can't understand it myself to begin with; and +being so many different sizes in a day is very confusing.' + + `It isn't,' said the Caterpillar. + + `Well, perhaps you haven't found it so yet,' said Alice; `but +when you have to turn into a chrysalis--you will some day, you +know--and then after that into a butterfly, I should think you'll +feel it a little queer, won't you?' + + `Not a bit,' said the Caterpillar. + + `Well, perhaps your feelings may be different,' said Alice; +`all I know is, it would feel very queer to ME.' + + `You!' said the Caterpillar contemptuously. `Who are YOU?' + + Which brought them back again to the beginning of the +conversation. Alice felt a little irritated at the Caterpillar's +making such VERY short remarks, and she drew herself up and said, +very gravely, `I think, you ought to tell me who YOU are, first.' + + `Why?' said the Caterpillar. + + Here was another puzzling question; and as Alice could not +think of any good reason, and as the Caterpillar seemed to be in +a VERY unpleasant state of mind, she turned away. + + `Come back!' the Caterpillar called after her. `I've something +important to say!' + + This sounded promising, certainly: Alice turned and came back +again. + + `Keep your temper,' said the Caterpillar. + + `Is that all?' said Alice, swallowing down her anger as well as +she could. + + `No,' said the Caterpillar. + + Alice thought she might as well wait, as she had nothing else +to do, and perhaps after all it might tell her something worth +hearing. For some minutes it puffed away without speaking, but +at last it unfolded its arms, took the hookah out of its mouth +again, and said, `So you think you're changed, do you?' + + `I'm afraid I am, sir,' said Alice; `I can't remember things as +I used--and I don't keep the same size for ten minutes together!' + + `Can't remember WHAT things?' said the Caterpillar. + + `Well, I've tried to say "HOW DOTH THE LITTLE BUSY BEE," but it +all came different!' Alice replied in a very melancholy voice. + + `Repeat, "YOU ARE OLD, FATHER WILLIAM,"' said the Caterpillar. + + Alice folded her hands, and began:-- + + `You are old, Father William,' the young man said, + `And your hair has become very white; + And yet you incessantly stand on your head-- + Do you think, at your age, it is right?' + + `In my youth,' Father William replied to his son, + `I feared it might injure the brain; + But, now that I'm perfectly sure I have none, + Why, I do it again and again.' + + `You are old,' said the youth, `as I mentioned before, + And have grown most uncommonly fat; + Yet you turned a back-somersault in at the door-- + Pray, what is the reason of that?' + + `In my youth,' said the sage, as he shook his grey locks, + `I kept all my limbs very supple + By the use of this ointment--one shilling the box-- + Allow me to sell you a couple?' + + `You are old,' said the youth, `and your jaws are too weak + For anything tougher than suet; + Yet you finished the goose, with the bones and the beak-- + Pray how did you manage to do it?' + + `In my youth,' said his father, `I took to the law, + And argued each case with my wife; + And the muscular strength, which it gave to my jaw, + Has lasted the rest of my life.' + + `You are old,' said the youth, `one would hardly suppose + That your eye was as steady as ever; + Yet you balanced an eel on the end of your nose-- + What made you so awfully clever?' + + `I have answered three questions, and that is enough,' + Said his father; `don't give yourself airs! + Do you think I can listen all day to such stuff? + Be off, or I'll kick you down stairs!' + + + `That is not said right,' said the Caterpillar. + + `Not QUITE right, I'm afraid,' said Alice, timidly; `some of the +words have got altered.' + + `It is wrong from beginning to end,' said the Caterpillar +decidedly, and there was silence for some minutes. + + The Caterpillar was the first to speak. + + `What size do you want to be?' it asked. + + `Oh, I'm not particular as to size,' Alice hastily replied; +`only one doesn't like changing so often, you know.' + + `I DON'T know,' said the Caterpillar. + + Alice said nothing: she had never been so much contradicted in +her life before, and she felt that she was losing her temper. + + `Are you content now?' said the Caterpillar. + + `Well, I should like to be a LITTLE larger, sir, if you +wouldn't mind,' said Alice: `three inches is such a wretched +height to be.' + + `It is a very good height indeed!' said the Caterpillar +angrily, rearing itself upright as it spoke (it was exactly three +inches high). + + `But I'm not used to it!' pleaded poor Alice in a piteous tone. +And she thought of herself, `I wish the creatures wouldn't be so +easily offended!' + + `You'll get used to it in time,' said the Caterpillar; and it +put the hookah into its mouth and began smoking again. + + This time Alice waited patiently until it chose to speak again. +In a minute or two the Caterpillar took the hookah out of its +mouth and yawned once or twice, and shook itself. Then it got +down off the mushroom, and crawled away in the grass, merely +remarking as it went, `One side will make you grow taller, and +the other side will make you grow shorter.' + + `One side of WHAT? The other side of WHAT?' thought Alice to +herself. + + `Of the mushroom,' said the Caterpillar, just as if she had +asked it aloud; and in another moment it was out of sight. + + Alice remained looking thoughtfully at the mushroom for a +minute, trying to make out which were the two sides of it; and as +it was perfectly round, she found this a very difficult question. +However, at last she stretched her arms round it as far as they +would go, and broke off a bit of the edge with each hand. + + `And now which is which?' she said to herself, and nibbled a +little of the right-hand bit to try the effect: the next moment +she felt a violent blow underneath her chin: it had struck her +foot! + + She was a good deal frightened by this very sudden change, but +she felt that there was no time to be lost, as she was shrinking +rapidly; so she set to work at once to eat some of the other bit. +Her chin was pressed so closely against her foot, that there was +hardly room to open her mouth; but she did it at last, and +managed to swallow a morsel of the lefthand bit. + + + * * * * * * * + + * * * * * * + + * * * * * * * + + `Come, my head's free at last!' said Alice in a tone of +delight, which changed into alarm in another moment, when she +found that her shoulders were nowhere to be found: all she could +see, when she looked down, was an immense length of neck, which +seemed to rise like a stalk out of a sea of green leaves that lay +far below her. + + `What CAN all that green stuff be?' said Alice. `And where +HAVE my shoulders got to? And oh, my poor hands, how is it I +can't see you?' She was moving them about as she spoke, but no +result seemed to follow, except a little shaking among the +distant green leaves. + + As there seemed to be no chance of getting her hands up to her +head, she tried to get her head down to them, and was delighted +to find that her neck would bend about easily in any direction, +like a serpent. She had just succeeded in curving it down into a +graceful zigzag, and was going to dive in among the leaves, which +she found to be nothing but the tops of the trees under which she +had been wandering, when a sharp hiss made her draw back in a +hurry: a large pigeon had flown into her face, and was beating +her violently with its wings. + + `Serpent!' screamed the Pigeon. + + `I'm NOT a serpent!' said Alice indignantly. `Let me alone!' + + `Serpent, I say again!' repeated the Pigeon, but in a more +subdued tone, and added with a kind of sob, `I've tried every +way, and nothing seems to suit them!' + + `I haven't the least idea what you're talking about,' said +Alice. + + `I've tried the roots of trees, and I've tried banks, and I've +tried hedges,' the Pigeon went on, without attending to her; `but +those serpents! There's no pleasing them!' + + Alice was more and more puzzled, but she thought there was no +use in saying anything more till the Pigeon had finished. + + `As if it wasn't trouble enough hatching the eggs,' said the +Pigeon; `but I must be on the look-out for serpents night and +day! Why, I haven't had a wink of sleep these three weeks!' + + `I'm very sorry you've been annoyed,' said Alice, who was +beginning to see its meaning. + + `And just as I'd taken the highest tree in the wood,' continued +the Pigeon, raising its voice to a shriek, `and just as I was +thinking I should be free of them at last, they must needs come +wriggling down from the sky! Ugh, Serpent!' + + `But I'm NOT a serpent, I tell you!' said Alice. `I'm a--I'm +a--' + + `Well! WHAT are you?' said the Pigeon. `I can see you're +trying to invent something!' + + `I--I'm a little girl,' said Alice, rather doubtfully, as she +remembered the number of changes she had gone through that day. + + `A likely story indeed!' said the Pigeon in a tone of the +deepest contempt. `I've seen a good many little girls in my +time, but never ONE with such a neck as that! No, no! You're a +serpent; and there's no use denying it. I suppose you'll be +telling me next that you never tasted an egg!' + + `I HAVE tasted eggs, certainly,' said Alice, who was a very +truthful child; `but little girls eat eggs quite as much as +serpents do, you know.' + + `I don't believe it,' said the Pigeon; `but if they do, why +then they're a kind of serpent, that's all I can say.' + + This was such a new idea to Alice, that she was quite silent +for a minute or two, which gave the Pigeon the opportunity of +adding, `You're looking for eggs, I know THAT well enough; and +what does it matter to me whether you're a little girl or a +serpent?' + + `It matters a good deal to ME,' said Alice hastily; `but I'm +not looking for eggs, as it happens; and if I was, I shouldn't +want YOURS: I don't like them raw.' + + `Well, be off, then!' said the Pigeon in a sulky tone, as it +settled down again into its nest. Alice crouched down among the +trees as well as she could, for her neck kept getting entangled +among the branches, and every now and then she had to stop and +untwist it. After a while she remembered that she still held the +pieces of mushroom in her hands, and she set to work very +carefully, nibbling first at one and then at the other, and +growing sometimes taller and sometimes shorter, until she had +succeeded in bringing herself down to her usual height. + + It was so long since she had been anything near the right size, +that it felt quite strange at first; but she got used to it in a +few minutes, and began talking to herself, as usual. `Come, +there's half my plan done now! How puzzling all these changes +are! I'm never sure what I'm going to be, from one minute to +another! However, I've got back to my right size: the next +thing is, to get into that beautiful garden--how IS that to be +done, I wonder?' As she said this, she came suddenly upon an +open place, with a little house in it about four feet high. +`Whoever lives there,' thought Alice, `it'll never do to come +upon them THIS size: why, I should frighten them out of their +wits!' So she began nibbling at the righthand bit again, and did +not venture to go near the house till she had brought herself +down to nine inches high. + + + + CHAPTER VI + + Pig and Pepper + + + For a minute or two she stood looking at the house, and +wondering what to do next, when suddenly a footman in livery came +running out of the wood--(she considered him to be a footman +because he was in livery: otherwise, judging by his face only, +she would have called him a fish)--and rapped loudly at the door +with his knuckles. It was opened by another footman in livery, +with a round face, and large eyes like a frog; and both footmen, +Alice noticed, had powdered hair that curled all over their +heads. She felt very curious to know what it was all about, and +crept a little way out of the wood to listen. + + The Fish-Footman began by producing from under his arm a great +letter, nearly as large as himself, and this he handed over to +the other, saying, in a solemn tone, `For the Duchess. An +invitation from the Queen to play croquet.' The Frog-Footman +repeated, in the same solemn tone, only changing the order of the +words a little, `From the Queen. An invitation for the Duchess +to play croquet.' + + Then they both bowed low, and their curls got entangled +together. + + Alice laughed so much at this, that she had to run back into +the wood for fear of their hearing her; and when she next peeped +out the Fish-Footman was gone, and the other was sitting on the +ground near the door, staring stupidly up into the sky. + + Alice went timidly up to the door, and knocked. + + `There's no sort of use in knocking,' said the Footman, `and +that for two reasons. First, because I'm on the same side of the +door as you are; secondly, because they're making such a noise +inside, no one could possibly hear you.' And certainly there was +a most extraordinary noise going on within--a constant howling +and sneezing, and every now and then a great crash, as if a dish +or kettle had been broken to pieces. + + `Please, then,' said Alice, `how am I to get in?' + + `There might be some sense in your knocking,' the Footman went +on without attending to her, `if we had the door between us. For +instance, if you were INSIDE, you might knock, and I could let +you out, you know.' He was looking up into the sky all the time +he was speaking, and this Alice thought decidedly uncivil. `But +perhaps he can't help it,' she said to herself; `his eyes are so +VERY nearly at the top of his head. But at any rate he might +answer questions.--How am I to get in?' she repeated, aloud. + + `I shall sit here,' the Footman remarked, `till tomorrow--' + + At this moment the door of the house opened, and a large plate +came skimming out, straight at the Footman's head: it just +grazed his nose, and broke to pieces against one of the trees +behind him. + + `--or next day, maybe,' the Footman continued in the same tone, +exactly as if nothing had happened. + + `How am I to get in?' asked Alice again, in a louder tone. + + `ARE you to get in at all?' said the Footman. `That's the +first question, you know.' + + It was, no doubt: only Alice did not like to be told so. +`It's really dreadful,' she muttered to herself, `the way all the +creatures argue. It's enough to drive one crazy!' + + The Footman seemed to think this a good opportunity for +repeating his remark, with variations. `I shall sit here,' he +said, `on and off, for days and days.' + + `But what am I to do?' said Alice. + + `Anything you like,' said the Footman, and began whistling. + + `Oh, there's no use in talking to him,' said Alice desperately: +`he's perfectly idiotic!' And she opened the door and went in. + + The door led right into a large kitchen, which was full of +smoke from one end to the other: the Duchess was sitting on a +three-legged stool in the middle, nursing a baby; the cook was +leaning over the fire, stirring a large cauldron which seemed to +be full of soup. + + `There's certainly too much pepper in that soup!' Alice said to +herself, as well as she could for sneezing. + + There was certainly too much of it in the air. Even the +Duchess sneezed occasionally; and as for the baby, it was +sneezing and howling alternately without a moment's pause. The +only things in the kitchen that did not sneeze, were the cook, +and a large cat which was sitting on the hearth and grinning from +ear to ear. + + `Please would you tell me,' said Alice, a little timidly, for +she was not quite sure whether it was good manners for her to +speak first, `why your cat grins like that?' + + `It's a Cheshire cat,' said the Duchess, `and that's why. Pig!' + + She said the last word with such sudden violence that Alice +quite jumped; but she saw in another moment that it was addressed +to the baby, and not to her, so she took courage, and went on +again:-- + + `I didn't know that Cheshire cats always grinned; in fact, I +didn't know that cats COULD grin.' + + `They all can,' said the Duchess; `and most of 'em do.' + + `I don't know of any that do,' Alice said very politely, +feeling quite pleased to have got into a conversation. + + `You don't know much,' said the Duchess; `and that's a fact.' + + Alice did not at all like the tone of this remark, and thought +it would be as well to introduce some other subject of +conversation. While she was trying to fix on one, the cook took +the cauldron of soup off the fire, and at once set to work +throwing everything within her reach at the Duchess and the baby +--the fire-irons came first; then followed a shower of saucepans, +plates, and dishes. The Duchess took no notice of them even when +they hit her; and the baby was howling so much already, that it +was quite impossible to say whether the blows hurt it or not. + + `Oh, PLEASE mind what you're doing!' cried Alice, jumping up +and down in an agony of terror. `Oh, there goes his PRECIOUS +nose'; as an unusually large saucepan flew close by it, and very +nearly carried it off. + + `If everybody minded their own business,' the Duchess said in a +hoarse growl, `the world would go round a deal faster than it +does.' + + `Which would NOT be an advantage,' said Alice, who felt very +glad to get an opportunity of showing off a little of her +knowledge. `Just think of what work it would make with the day +and night! You see the earth takes twenty-four hours to turn +round on its axis--' + + `Talking of axes,' said the Duchess, `chop off her head!' + + Alice glanced rather anxiously at the cook, to see if she meant +to take the hint; but the cook was busily stirring the soup, and +seemed not to be listening, so she went on again: `Twenty-four +hours, I THINK; or is it twelve? I--' + + `Oh, don't bother ME,' said the Duchess; `I never could abide +figures!' And with that she began nursing her child again, +singing a sort of lullaby to it as she did so, and giving it a +violent shake at the end of every line: + + `Speak roughly to your little boy, + And beat him when he sneezes: + He only does it to annoy, + Because he knows it teases.' + + CHORUS. + + (In which the cook and the baby joined):-- + + `Wow! wow! wow!' + + While the Duchess sang the second verse of the song, she kept +tossing the baby violently up and down, and the poor little thing +howled so, that Alice could hardly hear the words:-- + + `I speak severely to my boy, + I beat him when he sneezes; + For he can thoroughly enjoy + The pepper when he pleases!' + + CHORUS. + + `Wow! wow! wow!' + + `Here! you may nurse it a bit, if you like!' the Duchess said +to Alice, flinging the baby at her as she spoke. `I must go and +get ready to play croquet with the Queen,' and she hurried out of +the room. The cook threw a frying-pan after her as she went out, +but it just missed her. + + Alice caught the baby with some difficulty, as it was a queer- +shaped little creature, and held out its arms and legs in all +directions, `just like a star-fish,' thought Alice. The poor +little thing was snorting like a steam-engine when she caught it, +and kept doubling itself up and straightening itself out again, +so that altogether, for the first minute or two, it was as much +as she could do to hold it. + + As soon as she had made out the proper way of nursing it, +(which was to twist it up into a sort of knot, and then keep +tight hold of its right ear and left foot, so as to prevent its +undoing itself,) she carried it out into the open air. `IF I +don't take this child away with me,' thought Alice, `they're sure +to kill it in a day or two: wouldn't it be murder to leave it +behind?' She said the last words out loud, and the little thing +grunted in reply (it had left off sneezing by this time). `Don't +grunt,' said Alice; `that's not at all a proper way of expressing +yourself.' + + The baby grunted again, and Alice looked very anxiously into +its face to see what was the matter with it. There could be no +doubt that it had a VERY turn-up nose, much more like a snout +than a real nose; also its eyes were getting extremely small for +a baby: altogether Alice did not like the look of the thing at +all. `But perhaps it was only sobbing,' she thought, and looked +into its eyes again, to see if there were any tears. + + No, there were no tears. `If you're going to turn into a pig, +my dear,' said Alice, seriously, `I'll have nothing more to do +with you. Mind now!' The poor little thing sobbed again (or +grunted, it was impossible to say which), and they went on for +some while in silence. + + Alice was just beginning to think to herself, `Now, what am I +to do with this creature when I get it home?' when it grunted +again, so violently, that she looked down into its face in some +alarm. This time there could be NO mistake about it: it was +neither more nor less than a pig, and she felt that it would be +quite absurd for her to carry it further. + + So she set the little creature down, and felt quite relieved to +see it trot away quietly into the wood. `If it had grown up,' +she said to herself, `it would have made a dreadfully ugly child: +but it makes rather a handsome pig, I think.' And she began +thinking over other children she knew, who might do very well as +pigs, and was just saying to herself, `if one only knew the right +way to change them--' when she was a little startled by seeing +the Cheshire Cat sitting on a bough of a tree a few yards off. + + The Cat only grinned when it saw Alice. It looked good- +natured, she thought: still it had VERY long claws and a great +many teeth, so she felt that it ought to be treated with respect. + + `Cheshire Puss,' she began, rather timidly, as she did not at +all know whether it would like the name: however, it only +grinned a little wider. `Come, it's pleased so far,' thought +Alice, and she went on. `Would you tell me, please, which way I +ought to go from here?' + + `That depends a good deal on where you want to get to,' said +the Cat. + + `I don't much care where--' said Alice. + + `Then it doesn't matter which way you go,' said the Cat. + + `--so long as I get SOMEWHERE,' Alice added as an explanation. + + `Oh, you're sure to do that,' said the Cat, `if you only walk +long enough.' + + Alice felt that this could not be denied, so she tried another +question. `What sort of people live about here?' + + `In THAT direction,' the Cat said, waving its right paw round, +`lives a Hatter: and in THAT direction,' waving the other paw, +`lives a March Hare. Visit either you like: they're both mad.' + + `But I don't want to go among mad people,' Alice remarked. + + `Oh, you can't help that,' said the Cat: `we're all mad here. +I'm mad. You're mad.' + + `How do you know I'm mad?' said Alice. + + `You must be,' said the Cat, `or you wouldn't have come here.' + + Alice didn't think that proved it at all; however, she went on +`And how do you know that you're mad?' + + `To begin with,' said the Cat, `a dog's not mad. You grant +that?' + + `I suppose so,' said Alice. + + `Well, then,' the Cat went on, `you see, a dog growls when it's +angry, and wags its tail when it's pleased. Now I growl when I'm +pleased, and wag my tail when I'm angry. Therefore I'm mad.' + + `I call it purring, not growling,' said Alice. + + `Call it what you like,' said the Cat. `Do you play croquet +with the Queen to-day?' + + `I should like it very much,' said Alice, `but I haven't been +invited yet.' + + `You'll see me there,' said the Cat, and vanished. + + Alice was not much surprised at this, she was getting so used +to queer things happening. While she was looking at the place +where it had been, it suddenly appeared again. + + `By-the-bye, what became of the baby?' said the Cat. `I'd +nearly forgotten to ask.' + + `It turned into a pig,' Alice quietly said, just as if it had +come back in a natural way. + + `I thought it would,' said the Cat, and vanished again. + + Alice waited a little, half expecting to see it again, but it +did not appear, and after a minute or two she walked on in the +direction in which the March Hare was said to live. `I've seen +hatters before,' she said to herself; `the March Hare will be +much the most interesting, and perhaps as this is May it won't be +raving mad--at least not so mad as it was in March.' As she said +this, she looked up, and there was the Cat again, sitting on a +branch of a tree. + + `Did you say pig, or fig?' said the Cat. + + `I said pig,' replied Alice; `and I wish you wouldn't keep +appearing and vanishing so suddenly: you make one quite giddy.' + + `All right,' said the Cat; and this time it vanished quite slowly, +beginning with the end of the tail, and ending with the grin, +which remained some time after the rest of it had gone. + + `Well! I've often seen a cat without a grin,' thought Alice; +`but a grin without a cat! It's the most curious thing I ever +saw in my life!' + + She had not gone much farther before she came in sight of the +house of the March Hare: she thought it must be the right house, +because the chimneys were shaped like ears and the roof was +thatched with fur. It was so large a house, that she did not +like to go nearer till she had nibbled some more of the lefthand +bit of mushroom, and raised herself to about two feet high: even +then she walked up towards it rather timidly, saying to herself +`Suppose it should be raving mad after all! I almost wish I'd +gone to see the Hatter instead!' + + + + CHAPTER VII + + A Mad Tea-Party + + + There was a table set out under a tree in front of the house, +and the March Hare and the Hatter were having tea at it: a +Dormouse was sitting between them, fast asleep, and the other two +were using it as a cushion, resting their elbows on it, and talking +over its head. `Very uncomfortable for the Dormouse,' thought Alice; +`only, as it's asleep, I suppose it doesn't mind.' + + The table was a large one, but the three were all crowded +together at one corner of it: `No room! No room!' they cried +out when they saw Alice coming. `There's PLENTY of room!' said +Alice indignantly, and she sat down in a large arm-chair at one +end of the table. + + `Have some wine,' the March Hare said in an encouraging tone. + + Alice looked all round the table, but there was nothing on it +but tea. `I don't see any wine,' she remarked. + + `There isn't any,' said the March Hare. + + `Then it wasn't very civil of you to offer it,' said Alice +angrily. + + `It wasn't very civil of you to sit down without being +invited,' said the March Hare. + + `I didn't know it was YOUR table,' said Alice; `it's laid for a +great many more than three.' + + `Your hair wants cutting,' said the Hatter. He had been +looking at Alice for some time with great curiosity, and this was +his first speech. + + `You should learn not to make personal remarks,' Alice said +with some severity; `it's very rude.' + + The Hatter opened his eyes very wide on hearing this; but all +he SAID was, `Why is a raven like a writing-desk?' + + `Come, we shall have some fun now!' thought Alice. `I'm glad +they've begun asking riddles.--I believe I can guess that,' she +added aloud. + + `Do you mean that you think you can find out the answer to it?' +said the March Hare. + + `Exactly so,' said Alice. + + `Then you should say what you mean,' the March Hare went on. + + `I do,' Alice hastily replied; `at least--at least I mean what +I say--that's the same thing, you know.' + + `Not the same thing a bit!' said the Hatter. `You might just +as well say that "I see what I eat" is the same thing as "I eat +what I see"!' + + `You might just as well say,' added the March Hare, `that "I +like what I get" is the same thing as "I get what I like"!' + + `You might just as well say,' added the Dormouse, who seemed to +be talking in his sleep, `that "I breathe when I sleep" is the +same thing as "I sleep when I breathe"!' + + `It IS the same thing with you,' said the Hatter, and here the +conversation dropped, and the party sat silent for a minute, +while Alice thought over all she could remember about ravens and +writing-desks, which wasn't much. + + The Hatter was the first to break the silence. `What day of +the month is it?' he said, turning to Alice: he had taken his +watch out of his pocket, and was looking at it uneasily, shaking +it every now and then, and holding it to his ear. + + Alice considered a little, and then said `The fourth.' + + `Two days wrong!' sighed the Hatter. `I told you butter +wouldn't suit the works!' he added looking angrily at the March +Hare. + + `It was the BEST butter,' the March Hare meekly replied. + + `Yes, but some crumbs must have got in as well,' the Hatter +grumbled: `you shouldn't have put it in with the bread-knife.' + + The March Hare took the watch and looked at it gloomily: then +he dipped it into his cup of tea, and looked at it again: but he +could think of nothing better to say than his first remark, `It +was the BEST butter, you know.' + + Alice had been looking over his shoulder with some curiosity. +`What a funny watch!' she remarked. `It tells the day of the +month, and doesn't tell what o'clock it is!' + + `Why should it?' muttered the Hatter. `Does YOUR watch tell +you what year it is?' + + `Of course not,' Alice replied very readily: `but that's +because it stays the same year for such a long time together.' + + `Which is just the case with MINE,' said the Hatter. + + Alice felt dreadfully puzzled. The Hatter's remark seemed to +have no sort of meaning in it, and yet it was certainly English. +`I don't quite understand you,' she said, as politely as she +could. + + `The Dormouse is asleep again,' said the Hatter, and he poured +a little hot tea upon its nose. + + The Dormouse shook its head impatiently, and said, without +opening its eyes, `Of course, of course; just what I was going to +remark myself.' + + `Have you guessed the riddle yet?' the Hatter said, turning to +Alice again. + + `No, I give it up,' Alice replied: `what's the answer?' + + `I haven't the slightest idea,' said the Hatter. + + `Nor I,' said the March Hare. + + Alice sighed wearily. `I think you might do something better +with the time,' she said, `than waste it in asking riddles that +have no answers.' + + `If you knew Time as well as I do,' said the Hatter, `you +wouldn't talk about wasting IT. It's HIM.' + + `I don't know what you mean,' said Alice. + + `Of course you don't!' the Hatter said, tossing his head +contemptuously. `I dare say you never even spoke to Time!' + + `Perhaps not,' Alice cautiously replied: `but I know I have to +beat time when I learn music.' + + `Ah! that accounts for it,' said the Hatter. `He won't stand +beating. Now, if you only kept on good terms with him, he'd do +almost anything you liked with the clock. For instance, suppose +it were nine o'clock in the morning, just time to begin lessons: +you'd only have to whisper a hint to Time, and round goes the +clock in a twinkling! Half-past one, time for dinner!' + + (`I only wish it was,' the March Hare said to itself in a +whisper.) + + `That would be grand, certainly,' said Alice thoughtfully: +`but then--I shouldn't be hungry for it, you know.' + + `Not at first, perhaps,' said the Hatter: `but you could keep +it to half-past one as long as you liked.' + + `Is that the way YOU manage?' Alice asked. + + The Hatter shook his head mournfully. `Not I!' he replied. +`We quarrelled last March--just before HE went mad, you know--' +(pointing with his tea spoon at the March Hare,) `--it was at the +great concert given by the Queen of Hearts, and I had to sing + + "Twinkle, twinkle, little bat! + How I wonder what you're at!" + +You know the song, perhaps?' + + `I've heard something like it,' said Alice. + + `It goes on, you know,' the Hatter continued, `in this way:-- + + "Up above the world you fly, + Like a tea-tray in the sky. + Twinkle, twinkle--"' + +Here the Dormouse shook itself, and began singing in its sleep +`Twinkle, twinkle, twinkle, twinkle--' and went on so long that +they had to pinch it to make it stop. + + `Well, I'd hardly finished the first verse,' said the Hatter, +`when the Queen jumped up and bawled out, "He's murdering the +time! Off with his head!"' + + `How dreadfully savage!' exclaimed Alice. + + `And ever since that,' the Hatter went on in a mournful tone, +`he won't do a thing I ask! It's always six o'clock now.' + + A bright idea came into Alice's head. `Is that the reason so +many tea-things are put out here?' she asked. + + `Yes, that's it,' said the Hatter with a sigh: `it's always +tea-time, and we've no time to wash the things between whiles.' + + `Then you keep moving round, I suppose?' said Alice. + + `Exactly so,' said the Hatter: `as the things get used up.' + + `But what happens when you come to the beginning again?' Alice +ventured to ask. + + `Suppose we change the subject,' the March Hare interrupted, +yawning. `I'm getting tired of this. I vote the young lady +tells us a story.' + + `I'm afraid I don't know one,' said Alice, rather alarmed at +the proposal. + + `Then the Dormouse shall!' they both cried. `Wake up, +Dormouse!' And they pinched it on both sides at once. + + The Dormouse slowly opened his eyes. `I wasn't asleep,' he +said in a hoarse, feeble voice: `I heard every word you fellows +were saying.' + + `Tell us a story!' said the March Hare. + + `Yes, please do!' pleaded Alice. + + `And be quick about it,' added the Hatter, `or you'll be asleep +again before it's done.' + + `Once upon a time there were three little sisters,' the +Dormouse began in a great hurry; `and their names were Elsie, +Lacie, and Tillie; and they lived at the bottom of a well--' + + `What did they live on?' said Alice, who always took a great +interest in questions of eating and drinking. + + `They lived on treacle,' said the Dormouse, after thinking a +minute or two. + + `They couldn't have done that, you know,' Alice gently +remarked; `they'd have been ill.' + + `So they were,' said the Dormouse; `VERY ill.' + + Alice tried to fancy to herself what such an extraordinary ways +of living would be like, but it puzzled her too much, so she went +on: `But why did they live at the bottom of a well?' + + `Take some more tea,' the March Hare said to Alice, very +earnestly. + + `I've had nothing yet,' Alice replied in an offended tone, `so +I can't take more.' + + `You mean you can't take LESS,' said the Hatter: `it's very +easy to take MORE than nothing.' + + `Nobody asked YOUR opinion,' said Alice. + + `Who's making personal remarks now?' the Hatter asked +triumphantly. + + Alice did not quite know what to say to this: so she helped +herself to some tea and bread-and-butter, and then turned to the +Dormouse, and repeated her question. `Why did they live at the +bottom of a well?' + + The Dormouse again took a minute or two to think about it, and +then said, `It was a treacle-well.' + + `There's no such thing!' Alice was beginning very angrily, but +the Hatter and the March Hare went `Sh! sh!' and the Dormouse +sulkily remarked, `If you can't be civil, you'd better finish the +story for yourself.' + + `No, please go on!' Alice said very humbly; `I won't interrupt +again. I dare say there may be ONE.' + + `One, indeed!' said the Dormouse indignantly. However, he +consented to go on. `And so these three little sisters--they +were learning to draw, you know--' + + `What did they draw?' said Alice, quite forgetting her promise. + + `Treacle,' said the Dormouse, without considering at all this +time. + + `I want a clean cup,' interrupted the Hatter: `let's all move +one place on.' + + He moved on as he spoke, and the Dormouse followed him: the +March Hare moved into the Dormouse's place, and Alice rather +unwillingly took the place of the March Hare. The Hatter was the +only one who got any advantage from the change: and Alice was a +good deal worse off than before, as the March Hare had just upset +the milk-jug into his plate. + + Alice did not wish to offend the Dormouse again, so she began +very cautiously: `But I don't understand. Where did they draw +the treacle from?' + + `You can draw water out of a water-well,' said the Hatter; `so +I should think you could draw treacle out of a treacle-well--eh, +stupid?' + + `But they were IN the well,' Alice said to the Dormouse, not +choosing to notice this last remark. + + `Of course they were', said the Dormouse; `--well in.' + + This answer so confused poor Alice, that she let the Dormouse +go on for some time without interrupting it. + + `They were learning to draw,' the Dormouse went on, yawning and +rubbing its eyes, for it was getting very sleepy; `and they drew +all manner of things--everything that begins with an M--' + + `Why with an M?' said Alice. + + `Why not?' said the March Hare. + + Alice was silent. + + The Dormouse had closed its eyes by this time, and was going +off into a doze; but, on being pinched by the Hatter, it woke up +again with a little shriek, and went on: `--that begins with an +M, such as mouse-traps, and the moon, and memory, and muchness-- +you know you say things are "much of a muchness"--did you ever +see such a thing as a drawing of a muchness?' + + `Really, now you ask me,' said Alice, very much confused, `I +don't think--' + + `Then you shouldn't talk,' said the Hatter. + + This piece of rudeness was more than Alice could bear: she got +up in great disgust, and walked off; the Dormouse fell asleep +instantly, and neither of the others took the least notice of her +going, though she looked back once or twice, half hoping that +they would call after her: the last time she saw them, they were +trying to put the Dormouse into the teapot. + + `At any rate I'll never go THERE again!' said Alice as she +picked her way through the wood. `It's the stupidest tea-party I +ever was at in all my life!' + + Just as she said this, she noticed that one of the trees had a +door leading right into it. `That's very curious!' she thought. +`But everything's curious today. I think I may as well go in at once.' +And in she went. + + Once more she found herself in the long hall, and close to the +little glass table. `Now, I'll manage better this time,' +she said to herself, and began by taking the little golden key, +and unlocking the door that led into the garden. Then she went +to work nibbling at the mushroom (she had kept a piece of it +in her pocket) till she was about a foot high: then she walked down +the little passage: and THEN--she found herself at last in the +beautiful garden, among the bright flower-beds and the cool fountains. + + + + CHAPTER VIII + + The Queen's Croquet-Ground + + + A large rose-tree stood near the entrance of the garden: the +roses growing on it were white, but there were three gardeners at +it, busily painting them red. Alice thought this a very curious +thing, and she went nearer to watch them, and just as she came up +to them she heard one of them say, `Look out now, Five! Don't go +splashing paint over me like that!' + + `I couldn't help it,' said Five, in a sulky tone; `Seven jogged +my elbow.' + + On which Seven looked up and said, `That's right, Five! Always +lay the blame on others!' + + `YOU'D better not talk!' said Five. `I heard the Queen say only +yesterday you deserved to be beheaded!' + + `What for?' said the one who had spoken first. + + `That's none of YOUR business, Two!' said Seven. + + `Yes, it IS his business!' said Five, `and I'll tell him--it +was for bringing the cook tulip-roots instead of onions.' + + Seven flung down his brush, and had just begun `Well, of all +the unjust things--' when his eye chanced to fall upon Alice, as +she stood watching them, and he checked himself suddenly: the +others looked round also, and all of them bowed low. + + `Would you tell me,' said Alice, a little timidly, `why you are +painting those roses?' + + Five and Seven said nothing, but looked at Two. Two began in a +low voice, `Why the fact is, you see, Miss, this here ought to +have been a RED rose-tree, and we put a white one in by mistake; +and if the Queen was to find it out, we should all have our heads +cut off, you know. So you see, Miss, we're doing our best, afore +she comes, to--' At this moment Five, who had been anxiously +looking across the garden, called out `The Queen! The Queen!' +and the three gardeners instantly threw themselves flat upon +their faces. There was a sound of many footsteps, and Alice +looked round, eager to see the Queen. + + First came ten soldiers carrying clubs; these were all shaped +like the three gardeners, oblong and flat, with their hands and +feet at the corners: next the ten courtiers; these were +ornamented all over with diamonds, and walked two and two, as the +soldiers did. After these came the royal children; there were +ten of them, and the little dears came jumping merrily along hand +in hand, in couples: they were all ornamented with hearts. Next +came the guests, mostly Kings and Queens, and among them Alice +recognised the White Rabbit: it was talking in a hurried nervous +manner, smiling at everything that was said, and went by without +noticing her. Then followed the Knave of Hearts, carrying the +King's crown on a crimson velvet cushion; and, last of all this +grand procession, came THE KING AND QUEEN OF HEARTS. + + Alice was rather doubtful whether she ought not to lie down on +her face like the three gardeners, but she could not remember +ever having heard of such a rule at processions; `and besides, +what would be the use of a procession,' thought she, `if people +had all to lie down upon their faces, so that they couldn't see it?' +So she stood still where she was, and waited. + + When the procession came opposite to Alice, they all stopped +and looked at her, and the Queen said severely `Who is this?' +She said it to the Knave of Hearts, who only bowed and smiled in reply. + + `Idiot!' said the Queen, tossing her head impatiently; and, +turning to Alice, she went on, `What's your name, child?' + + `My name is Alice, so please your Majesty,' said Alice very +politely; but she added, to herself, `Why, they're only a pack of +cards, after all. I needn't be afraid of them!' + + `And who are THESE?' said the Queen, pointing to the three +gardeners who were lying round the rosetree; for, you see, as +they were lying on their faces, and the pattern on their backs +was the same as the rest of the pack, she could not tell whether +they were gardeners, or soldiers, or courtiers, or three of her +own children. + + `How should I know?' said Alice, surprised at her own courage. +`It's no business of MINE.' + + The Queen turned crimson with fury, and, after glaring at her +for a moment like a wild beast, screamed `Off with her head! +Off--' + + `Nonsense!' said Alice, very loudly and decidedly, and the +Queen was silent. + + The King laid his hand upon her arm, and timidly said +`Consider, my dear: she is only a child!' + + The Queen turned angrily away from him, and said to the Knave +`Turn them over!' + + The Knave did so, very carefully, with one foot. + + `Get up!' said the Queen, in a shrill, loud voice, and the +three gardeners instantly jumped up, and began bowing to the +King, the Queen, the royal children, and everybody else. + + `Leave off that!' screamed the Queen. `You make me giddy.' +And then, turning to the rose-tree, she went on, `What HAVE you +been doing here?' + + `May it please your Majesty,' said Two, in a very humble tone, +going down on one knee as he spoke, `we were trying--' + + `I see!' said the Queen, who had meanwhile been examining the +roses. `Off with their heads!' and the procession moved on, +three of the soldiers remaining behind to execute the unfortunate +gardeners, who ran to Alice for protection. + + `You shan't be beheaded!' said Alice, and she put them into a +large flower-pot that stood near. The three soldiers wandered +about for a minute or two, looking for them, and then quietly +marched off after the others. + + `Are their heads off?' shouted the Queen. + + `Their heads are gone, if it please your Majesty!' the soldiers +shouted in reply. + + `That's right!' shouted the Queen. `Can you play croquet?' + + The soldiers were silent, and looked at Alice, as the question +was evidently meant for her. + + `Yes!' shouted Alice. + + `Come on, then!' roared the Queen, and Alice joined the +procession, wondering very much what would happen next. + + `It's--it's a very fine day!' said a timid voice at her side. +She was walking by the White Rabbit, who was peeping anxiously +into her face. + + `Very,' said Alice: `--where's the Duchess?' + + `Hush! Hush!' said the Rabbit in a low, hurried tone. He +looked anxiously over his shoulder as he spoke, and then raised +himself upon tiptoe, put his mouth close to her ear, and +whispered `She's under sentence of execution.' + + `What for?' said Alice. + + `Did you say "What a pity!"?' the Rabbit asked. + + `No, I didn't,' said Alice: `I don't think it's at all a pity. +I said "What for?"' + + `She boxed the Queen's ears--' the Rabbit began. Alice gave a +little scream of laughter. `Oh, hush!' the Rabbit whispered in a +frightened tone. `The Queen will hear you! You see, she came +rather late, and the Queen said--' + + `Get to your places!' shouted the Queen in a voice of thunder, +and people began running about in all directions, tumbling up +against each other; however, they got settled down in a minute or +two, and the game began. Alice thought she had never seen such a +curious croquet-ground in her life; it was all ridges and +furrows; the balls were live hedgehogs, the mallets live +flamingoes, and the soldiers had to double themselves up and to +stand on their hands and feet, to make the arches. + + The chief difficulty Alice found at first was in managing her +flamingo: she succeeded in getting its body tucked away, +comfortably enough, under her arm, with its legs hanging down, +but generally, just as she had got its neck nicely straightened +out, and was going to give the hedgehog a blow with its head, it +WOULD twist itself round and look up in her face, with such a +puzzled expression that she could not help bursting out laughing: +and when she had got its head down, and was going to begin again, +it was very provoking to find that the hedgehog had unrolled +itself, and was in the act of crawling away: besides all this, +there was generally a ridge or furrow in the way wherever she +wanted to send the hedgehog to, and, as the doubled-up soldiers +were always getting up and walking off to other parts of the +ground, Alice soon came to the conclusion that it was a very +difficult game indeed. + + The players all played at once without waiting for turns, +quarrelling all the while, and fighting for the hedgehogs; and in +a very short time the Queen was in a furious passion, and went +stamping about, and shouting `Off with his head!' or `Off with +her head!' about once in a minute. + + Alice began to feel very uneasy: to be sure, she had not as +yet had any dispute with the Queen, but she knew that it might +happen any minute, `and then,' thought she, `what would become of +me? They're dreadfully fond of beheading people here; the great +wonder is, that there's any one left alive!' + + She was looking about for some way of escape, and wondering +whether she could get away without being seen, when she noticed a +curious appearance in the air: it puzzled her very much at +first, but, after watching it a minute or two, she made it out to +be a grin, and she said to herself `It's the Cheshire Cat: now I +shall have somebody to talk to.' + + `How are you getting on?' said the Cat, as soon as there was +mouth enough for it to speak with. + + Alice waited till the eyes appeared, and then nodded. `It's no +use speaking to it,' she thought, `till its ears have come, or at +least one of them.' In another minute the whole head appeared, +and then Alice put down her flamingo, and began an account of the +game, feeling very glad she had someone to listen to her. The +Cat seemed to think that there was enough of it now in sight, and +no more of it appeared. + + `I don't think they play at all fairly,' Alice began, in rather +a complaining tone, `and they all quarrel so dreadfully one can't +hear oneself speak--and they don't seem to have any rules in +particular; at least, if there are, nobody attends to them--and +you've no idea how confusing it is all the things being alive; +for instance, there's the arch I've got to go through next +walking about at the other end of the ground--and I should have +croqueted the Queen's hedgehog just now, only it ran away when it +saw mine coming!' + + `How do you like the Queen?' said the Cat in a low voice. + + `Not at all,' said Alice: `she's so extremely--' Just then +she noticed that the Queen was close behind her, listening: so +she went on, `--likely to win, that it's hardly worth while +finishing the game.' + + The Queen smiled and passed on. + + `Who ARE you talking to?' said the King, going up to Alice, and +looking at the Cat's head with great curiosity. + + `It's a friend of mine--a Cheshire Cat,' said Alice: `allow me +to introduce it.' + + `I don't like the look of it at all,' said the King: +`however, it may kiss my hand if it likes.' + + `I'd rather not,' the Cat remarked. + + `Don't be impertinent,' said the King, `and don't look at me +like that!' He got behind Alice as he spoke. + + `A cat may look at a king,' said Alice. `I've read that in +some book, but I don't remember where.' + + `Well, it must be removed,' said the King very decidedly, and +he called the Queen, who was passing at the moment, `My dear! I +wish you would have this cat removed!' + + The Queen had only one way of settling all difficulties, great +or small. `Off with his head!' she said, without even looking +round. + + `I'll fetch the executioner myself,' said the King eagerly, and +he hurried off. + + Alice thought she might as well go back, and see how the game +was going on, as she heard the Queen's voice in the distance, +screaming with passion. She had already heard her sentence three +of the players to be executed for having missed their turns, and +she did not like the look of things at all, as the game was in +such confusion that she never knew whether it was her turn or +not. So she went in search of her hedgehog. + + The hedgehog was engaged in a fight with another hedgehog, +which seemed to Alice an excellent opportunity for croqueting one +of them with the other: the only difficulty was, that her +flamingo was gone across to the other side of the garden, where +Alice could see it trying in a helpless sort of way to fly up +into a tree. + + By the time she had caught the flamingo and brought it back, +the fight was over, and both the hedgehogs were out of sight: +`but it doesn't matter much,' thought Alice, `as all the arches +are gone from this side of the ground.' So she tucked it away +under her arm, that it might not escape again, and went back for +a little more conversation with her friend. + + When she got back to the Cheshire Cat, she was surprised to +find quite a large crowd collected round it: there was a dispute +going on between the executioner, the King, and the Queen, who +were all talking at once, while all the rest were quite silent, +and looked very uncomfortable. + + The moment Alice appeared, she was appealed to by all three to +settle the question, and they repeated their arguments to her, +though, as they all spoke at once, she found it very hard indeed +to make out exactly what they said. + + The executioner's argument was, that you couldn't cut off a +head unless there was a body to cut it off from: that he had +never had to do such a thing before, and he wasn't going to begin +at HIS time of life. + + The King's argument was, that anything that had a head could be +beheaded, and that you weren't to talk nonsense. + + The Queen's argument was, that if something wasn't done about +it in less than no time she'd have everybody executed, all round. +(It was this last remark that had made the whole party look so +grave and anxious.) + + Alice could think of nothing else to say but `It belongs to the +Duchess: you'd better ask HER about it.' + + `She's in prison,' the Queen said to the executioner: `fetch +her here.' And the executioner went off like an arrow. + + The Cat's head began fading away the moment he was gone, and, +by the time he had come back with the Duchess, it had entirely +disappeared; so the King and the executioner ran wildly up and down +looking for it, while the rest of the party went back to the game. + + + + CHAPTER IX + + The Mock Turtle's Story + + + `You can't think how glad I am to see you again, you dear old +thing!' said the Duchess, as she tucked her arm affectionately +into Alice's, and they walked off together. + + Alice was very glad to find her in such a pleasant temper, and +thought to herself that perhaps it was only the pepper that had +made her so savage when they met in the kitchen. + + `When I'M a Duchess,' she said to herself, (not in a very +hopeful tone though), `I won't have any pepper in my kitchen AT +ALL. Soup does very well without--Maybe it's always pepper that +makes people hot-tempered,' she went on, very much pleased at +having found out a new kind of rule, `and vinegar that makes them +sour--and camomile that makes them bitter--and--and barley-sugar +and such things that make children sweet-tempered. I only wish +people knew that: then they wouldn't be so stingy about it, you +know--' + + She had quite forgotten the Duchess by this time, and was a +little startled when she heard her voice close to her ear. +`You're thinking about something, my dear, and that makes you +forget to talk. I can't tell you just now what the moral of that +is, but I shall remember it in a bit.' + + `Perhaps it hasn't one,' Alice ventured to remark. + + `Tut, tut, child!' said the Duchess. `Everything's got a +moral, if only you can find it.' And she squeezed herself up +closer to Alice's side as she spoke. + + Alice did not much like keeping so close to her: first, +because the Duchess was VERY ugly; and secondly, because she was +exactly the right height to rest her chin upon Alice's shoulder, +and it was an uncomfortably sharp chin. However, she did not +like to be rude, so she bore it as well as she could. + + `The game's going on rather better now,' she said, by way of +keeping up the conversation a little. + + `'Tis so,' said the Duchess: `and the moral of that is--"Oh, +'tis love, 'tis love, that makes the world go round!"' + + `Somebody said,' Alice whispered, `that it's done by everybody +minding their own business!' + + `Ah, well! It means much the same thing,' said the Duchess, +digging her sharp little chin into Alice's shoulder as she added, +`and the moral of THAT is--"Take care of the sense, and the +sounds will take care of themselves."' + + `How fond she is of finding morals in things!' Alice thought to +herself. + + `I dare say you're wondering why I don't put my arm round your +waist,' the Duchess said after a pause: `the reason is, that I'm +doubtful about the temper of your flamingo. Shall I try the +experiment?' + + `HE might bite,' Alice cautiously replied, not feeling at all +anxious to have the experiment tried. + + `Very true,' said the Duchess: `flamingoes and mustard both +bite. And the moral of that is--"Birds of a feather flock +together."' + + `Only mustard isn't a bird,' Alice remarked. + + `Right, as usual,' said the Duchess: `what a clear way you +have of putting things!' + + `It's a mineral, I THINK,' said Alice. + + `Of course it is,' said the Duchess, who seemed ready to agree +to everything that Alice said; `there's a large mustard-mine near +here. And the moral of that is--"The more there is of mine, the +less there is of yours."' + + `Oh, I know!' exclaimed Alice, who had not attended to this +last remark, `it's a vegetable. It doesn't look like one, but it +is.' + + `I quite agree with you,' said the Duchess; `and the moral of +that is--"Be what you would seem to be"--or if you'd like it put +more simply--"Never imagine yourself not to be otherwise than +what it might appear to others that what you were or might have +been was not otherwise than what you had been would have appeared +to them to be otherwise."' + + `I think I should understand that better,' Alice said very +politely, `if I had it written down: but I can't quite follow it +as you say it.' + + `That's nothing to what I could say if I chose,' the Duchess +replied, in a pleased tone. + + `Pray don't trouble yourself to say it any longer than that,' +said Alice. + + `Oh, don't talk about trouble!' said the Duchess. `I make you +a present of everything I've said as yet.' + + `A cheap sort of present!' thought Alice. `I'm glad they don't +give birthday presents like that!' But she did not venture to +say it out loud. + + `Thinking again?' the Duchess asked, with another dig of her +sharp little chin. + + `I've a right to think,' said Alice sharply, for she was +beginning to feel a little worried. + + `Just about as much right,' said the Duchess, `as pigs have to fly; +and the m--' + + But here, to Alice's great surprise, the Duchess's voice died +away, even in the middle of her favourite word `moral,' and the +arm that was linked into hers began to tremble. Alice looked up, +and there stood the Queen in front of them, with her arms folded, +frowning like a thunderstorm. + + `A fine day, your Majesty!' the Duchess began in a low, weak +voice. + + `Now, I give you fair warning,' shouted the Queen, stamping on +the ground as she spoke; `either you or your head must be off, +and that in about half no time! Take your choice!' + + The Duchess took her choice, and was gone in a moment. + + `Let's go on with the game,' the Queen said to Alice; and Alice +was too much frightened to say a word, but slowly followed her +back to the croquet-ground. + + The other guests had taken advantage of the Queen's absence, +and were resting in the shade: however, the moment they saw her, +they hurried back to the game, the Queen merely remarking that a +moment's delay would cost them their lives. + + All the time they were playing the Queen never left off +quarrelling with the other players, and shouting `Off with his +head!' or `Off with her head!' Those whom she sentenced were +taken into custody by the soldiers, who of course had to leave +off being arches to do this, so that by the end of half an hour +or so there were no arches left, and all the players, except the +King, the Queen, and Alice, were in custody and under sentence of +execution. + + Then the Queen left off, quite out of breath, and said to +Alice, `Have you seen the Mock Turtle yet?' + + `No,' said Alice. `I don't even know what a Mock Turtle is.' + + `It's the thing Mock Turtle Soup is made from,' said the Queen. + + `I never saw one, or heard of one,' said Alice. + + `Come on, then,' said the Queen, `and he shall tell you his +history,' + + As they walked off together, Alice heard the King say in a low +voice, to the company generally, `You are all pardoned.' `Come, +THAT'S a good thing!' she said to herself, for she had felt quite +unhappy at the number of executions the Queen had ordered. + + They very soon came upon a Gryphon, lying fast asleep in the +sun. (IF you don't know what a Gryphon is, look at the picture.) +`Up, lazy thing!' said the Queen, `and take this young lady to +see the Mock Turtle, and to hear his history. I must go back and +see after some executions I have ordered'; and she walked off, +leaving Alice alone with the Gryphon. Alice did not quite like +the look of the creature, but on the whole she thought it would +be quite as safe to stay with it as to go after that savage +Queen: so she waited. + + The Gryphon sat up and rubbed its eyes: then it watched the +Queen till she was out of sight: then it chuckled. `What fun!' +said the Gryphon, half to itself, half to Alice. + + `What IS the fun?' said Alice. + + `Why, SHE,' said the Gryphon. `It's all her fancy, that: they +never executes nobody, you know. Come on!' + + `Everybody says "come on!" here,' thought Alice, as she went +slowly after it: `I never was so ordered about in all my life, +never!' + + They had not gone far before they saw the Mock Turtle in the +distance, sitting sad and lonely on a little ledge of rock, and, +as they came nearer, Alice could hear him sighing as if his heart +would break. She pitied him deeply. `What is his sorrow?' she +asked the Gryphon, and the Gryphon answered, very nearly in the +same words as before, `It's all his fancy, that: he hasn't got +no sorrow, you know. Come on!' + + So they went up to the Mock Turtle, who looked at them with +large eyes full of tears, but said nothing. + + `This here young lady,' said the Gryphon, `she wants for to +know your history, she do.' + + `I'll tell it her,' said the Mock Turtle in a deep, hollow +tone: `sit down, both of you, and don't speak a word till I've +finished.' + + So they sat down, and nobody spoke for some minutes. Alice +thought to herself, `I don't see how he can EVEN finish, if he +doesn't begin.' But she waited patiently. + + `Once,' said the Mock Turtle at last, with a deep sigh, `I was +a real Turtle.' + + These words were followed by a very long silence, broken only +by an occasional exclamation of `Hjckrrh!' from the Gryphon, and +the constant heavy sobbing of the Mock Turtle. Alice was very +nearly getting up and saying, `Thank you, sir, for your +interesting story,' but she could not help thinking there MUST be +more to come, so she sat still and said nothing. + + `When we were little,' the Mock Turtle went on at last, more +calmly, though still sobbing a little now and then, `we went to +school in the sea. The master was an old Turtle--we used to call +him Tortoise--' + + `Why did you call him Tortoise, if he wasn't one?' Alice asked. + + `We called him Tortoise because he taught us,' said the Mock +Turtle angrily: `really you are very dull!' + + `You ought to be ashamed of yourself for asking such a simple +question,' added the Gryphon; and then they both sat silent and +looked at poor Alice, who felt ready to sink into the earth. At +last the Gryphon said to the Mock Turtle, `Drive on, old fellow! +Don't be all day about it!' and he went on in these words: + + `Yes, we went to school in the sea, though you mayn't believe +it--' + + `I never said I didn't!' interrupted Alice. + + `You did,' said the Mock Turtle. + + `Hold your tongue!' added the Gryphon, before Alice could speak +again. The Mock Turtle went on. + + `We had the best of educations--in fact, we went to school +every day--' + + `I'VE been to a day-school, too,' said Alice; `you needn't be +so proud as all that.' + + `With extras?' asked the Mock Turtle a little anxiously. + + `Yes,' said Alice, `we learned French and music.' + + `And washing?' said the Mock Turtle. + + `Certainly not!' said Alice indignantly. + + `Ah! then yours wasn't a really good school,' said the Mock +Turtle in a tone of great relief. `Now at OURS they had at the +end of the bill, "French, music, AND WASHING--extra."' + + `You couldn't have wanted it much,' said Alice; `living at the +bottom of the sea.' + + `I couldn't afford to learn it.' said the Mock Turtle with a +sigh. `I only took the regular course.' + + `What was that?' inquired Alice. + + `Reeling and Writhing, of course, to begin with,' the Mock +Turtle replied; `and then the different branches of Arithmetic-- +Ambition, Distraction, Uglification, and Derision.' + + `I never heard of "Uglification,"' Alice ventured to say. `What is it?' + + The Gryphon lifted up both its paws in surprise. `What! Never +heard of uglifying!' it exclaimed. `You know what to beautify is, +I suppose?' + + `Yes,' said Alice doubtfully: `it means--to--make--anything--prettier.' + + `Well, then,' the Gryphon went on, `if you don't know what to +uglify is, you ARE a simpleton.' + + Alice did not feel encouraged to ask any more questions about +it, so she turned to the Mock Turtle, and said `What else had you +to learn?' + + `Well, there was Mystery,' the Mock Turtle replied, counting +off the subjects on his flappers, `--Mystery, ancient and modern, +with Seaography: then Drawling--the Drawling-master was an old +conger-eel, that used to come once a week: HE taught us +Drawling, Stretching, and Fainting in Coils.' + + `What was THAT like?' said Alice. + + `Well, I can't show it you myself,' the Mock Turtle said: `I'm +too stiff. And the Gryphon never learnt it.' + + `Hadn't time,' said the Gryphon: `I went to the Classics +master, though. He was an old crab, HE was.' + + `I never went to him,' the Mock Turtle said with a sigh: `he +taught Laughing and Grief, they used to say.' + + `So he did, so he did,' said the Gryphon, sighing in his turn; +and both creatures hid their faces in their paws. + + `And how many hours a day did you do lessons?' said Alice, in a +hurry to change the subject. + + `Ten hours the first day,' said the Mock Turtle: `nine the +next, and so on.' + + `What a curious plan!' exclaimed Alice. + + `That's the reason they're called lessons,' the Gryphon +remarked: `because they lessen from day to day.' + + This was quite a new idea to Alice, and she thought it over a +little before she made her next remark. `Then the eleventh day +must have been a holiday?' + + `Of course it was,' said the Mock Turtle. + + `And how did you manage on the twelfth?' Alice went on eagerly. + + `That's enough about lessons,' the Gryphon interrupted in a +very decided tone: `tell her something about the games now.' + + + + CHAPTER X + + The Lobster Quadrille + + + The Mock Turtle sighed deeply, and drew the back of one flapper +across his eyes. He looked at Alice, and tried to speak, but for +a minute or two sobs choked his voice. `Same as if he had a bone +in his throat,' said the Gryphon: and it set to work shaking him +and punching him in the back. At last the Mock Turtle recovered +his voice, and, with tears running down his cheeks, he went on +again:-- + + `You may not have lived much under the sea--' (`I haven't,' said Alice)-- +`and perhaps you were never even introduced to a lobster--' +(Alice began to say `I once tasted--' but checked herself hastily, +and said `No, never') `--so you can have no idea what a delightful +thing a Lobster Quadrille is!' + + `No, indeed,' said Alice. `What sort of a dance is it?' + + `Why,' said the Gryphon, `you first form into a line along the sea-shore--' + + `Two lines!' cried the Mock Turtle. `Seals, turtles, salmon, and so on; +then, when you've cleared all the jelly-fish out of the way--' + + `THAT generally takes some time,' interrupted the Gryphon. + + `--you advance twice--' + + `Each with a lobster as a partner!' cried the Gryphon. + + `Of course,' the Mock Turtle said: `advance twice, set to +partners--' + + `--change lobsters, and retire in same order,' continued the +Gryphon. + + `Then, you know,' the Mock Turtle went on, `you throw the--' + + `The lobsters!' shouted the Gryphon, with a bound into the air. + + `--as far out to sea as you can--' + + `Swim after them!' screamed the Gryphon. + + `Turn a somersault in the sea!' cried the Mock Turtle, +capering wildly about. + + `Change lobsters again!' yelled the Gryphon at the top of its voice. + + `Back to land again, and that's all the first figure,' said the +Mock Turtle, suddenly dropping his voice; and the two creatures, +who had been jumping about like mad things all this time, sat +down again very sadly and quietly, and looked at Alice. + + `It must be a very pretty dance,' said Alice timidly. + + `Would you like to see a little of it?' said the Mock Turtle. + + `Very much indeed,' said Alice. + + `Come, let's try the first figure!' said the Mock Turtle to the +Gryphon. `We can do without lobsters, you know. Which shall +sing?' + + `Oh, YOU sing,' said the Gryphon. `I've forgotten the words.' + + So they began solemnly dancing round and round Alice, every now +and then treading on her toes when they passed too close, and +waving their forepaws to mark the time, while the Mock Turtle +sang this, very slowly and sadly:-- + + +`"Will you walk a little faster?" said a whiting to a snail. +"There's a porpoise close behind us, and he's treading on my + tail. +See how eagerly the lobsters and the turtles all advance! +They are waiting on the shingle--will you come and join the +dance? + +Will you, won't you, will you, won't you, will you join the +dance? +Will you, won't you, will you, won't you, won't you join the +dance? + + +"You can really have no notion how delightful it will be +When they take us up and throw us, with the lobsters, out to + sea!" +But the snail replied "Too far, too far!" and gave a look + askance-- +Said he thanked the whiting kindly, but he would not join the + dance. + Would not, could not, would not, could not, would not join + the dance. + Would not, could not, would not, could not, could not join + the dance. + +`"What matters it how far we go?" his scaly friend replied. +"There is another shore, you know, upon the other side. +The further off from England the nearer is to France-- +Then turn not pale, beloved snail, but come and join the dance. + + Will you, won't you, will you, won't you, will you join the + dance? + Will you, won't you, will you, won't you, won't you join the + dance?"' + + + + `Thank you, it's a very interesting dance to watch,' said +Alice, feeling very glad that it was over at last: `and I do so +like that curious song about the whiting!' + + `Oh, as to the whiting,' said the Mock Turtle, `they--you've +seen them, of course?' + + `Yes,' said Alice, `I've often seen them at dinn--' she +checked herself hastily. + + `I don't know where Dinn may be,' said the Mock Turtle, `but +if you've seen them so often, of course you know what they're +like.' + + `I believe so,' Alice replied thoughtfully. `They have their +tails in their mouths--and they're all over crumbs.' + + `You're wrong about the crumbs,' said the Mock Turtle: +`crumbs would all wash off in the sea. But they HAVE their tails +in their mouths; and the reason is--' here the Mock Turtle +yawned and shut his eyes.--`Tell her about the reason and all +that,' he said to the Gryphon. + + `The reason is,' said the Gryphon, `that they WOULD go with +the lobsters to the dance. So they got thrown out to sea. So +they had to fall a long way. So they got their tails fast in +their mouths. So they couldn't get them out again. That's all.' + + `Thank you,' said Alice, `it's very interesting. I never knew +so much about a whiting before.' + + `I can tell you more than that, if you like,' said the +Gryphon. `Do you know why it's called a whiting?' + + `I never thought about it,' said Alice. `Why?' + + `IT DOES THE BOOTS AND SHOES.' the Gryphon replied very +solemnly. + + Alice was thoroughly puzzled. `Does the boots and shoes!' she +repeated in a wondering tone. + + `Why, what are YOUR shoes done with?' said the Gryphon. `I +mean, what makes them so shiny?' + + Alice looked down at them, and considered a little before she +gave her answer. `They're done with blacking, I believe.' + + `Boots and shoes under the sea,' the Gryphon went on in a deep +voice, `are done with a whiting. Now you know.' + + `And what are they made of?' Alice asked in a tone of great +curiosity. + + `Soles and eels, of course,' the Gryphon replied rather +impatiently: `any shrimp could have told you that.' + + `If I'd been the whiting,' said Alice, whose thoughts were +still running on the song, `I'd have said to the porpoise, "Keep +back, please: we don't want YOU with us!"' + + `They were obliged to have him with them,' the Mock Turtle +said: `no wise fish would go anywhere without a porpoise.' + + `Wouldn't it really?' said Alice in a tone of great surprise. + + `Of course not,' said the Mock Turtle: `why, if a fish came +to ME, and told me he was going a journey, I should say "With +what porpoise?"' + + `Don't you mean "purpose"?' said Alice. + + `I mean what I say,' the Mock Turtle replied in an offended +tone. And the Gryphon added `Come, let's hear some of YOUR +adventures.' + + `I could tell you my adventures--beginning from this morning,' +said Alice a little timidly: `but it's no use going back to +yesterday, because I was a different person then.' + + `Explain all that,' said the Mock Turtle. + + `No, no! The adventures first,' said the Gryphon in an +impatient tone: `explanations take such a dreadful time.' + + So Alice began telling them her adventures from the time when +she first saw the White Rabbit. She was a little nervous about +it just at first, the two creatures got so close to her, one on +each side, and opened their eyes and mouths so VERY wide, but she +gained courage as she went on. Her listeners were perfectly +quiet till she got to the part about her repeating `YOU ARE OLD, +FATHER WILLIAM,' to the Caterpillar, and the words all coming +different, and then the Mock Turtle drew a long breath, and said +`That's very curious.' + + `It's all about as curious as it can be,' said the Gryphon. + + `It all came different!' the Mock Turtle repeated +thoughtfully. `I should like to hear her try and repeat +something now. Tell her to begin.' He looked at the Gryphon as +if he thought it had some kind of authority over Alice. + + `Stand up and repeat "'TIS THE VOICE OF THE SLUGGARD,"' said +the Gryphon. + + `How the creatures order one about, and make one repeat +lessons!' thought Alice; `I might as well be at school at once.' +However, she got up, and began to repeat it, but her head was so +full of the Lobster Quadrille, that she hardly knew what she was +saying, and the words came very queer indeed:-- + + `'Tis the voice of the Lobster; I heard him declare, + "You have baked me too brown, I must sugar my hair." + As a duck with its eyelids, so he with his nose + Trims his belt and his buttons, and turns out his toes.' + + [later editions continued as follows + When the sands are all dry, he is gay as a lark, + And will talk in contemptuous tones of the Shark, + But, when the tide rises and sharks are around, + His voice has a timid and tremulous sound.] + + `That's different from what I used to say when I was a child,' +said the Gryphon. + + `Well, I never heard it before,' said the Mock Turtle; `but it +sounds uncommon nonsense.' + + Alice said nothing; she had sat down with her face in her +hands, wondering if anything would EVER happen in a natural way +again. + + `I should like to have it explained,' said the Mock Turtle. + + `She can't explain it,' said the Gryphon hastily. `Go on with +the next verse.' + + `But about his toes?' the Mock Turtle persisted. `How COULD +he turn them out with his nose, you know?' + + `It's the first position in dancing.' Alice said; but was +dreadfully puzzled by the whole thing, and longed to change the +subject. + + `Go on with the next verse,' the Gryphon repeated impatiently: +`it begins "I passed by his garden."' + + Alice did not dare to disobey, though she felt sure it would +all come wrong, and she went on in a trembling voice:-- + + `I passed by his garden, and marked, with one eye, + How the Owl and the Panther were sharing a pie--' + + [later editions continued as follows + The Panther took pie-crust, and gravy, and meat, + While the Owl had the dish as its share of the treat. + When the pie was all finished, the Owl, as a boon, + Was kindly permitted to pocket the spoon: + While the Panther received knife and fork with a growl, + And concluded the banquet--] + + `What IS the use of repeating all that stuff,' the Mock Turtle +interrupted, `if you don't explain it as you go on? It's by far +the most confusing thing I ever heard!' + + `Yes, I think you'd better leave off,' said the Gryphon: and +Alice was only too glad to do so. + + `Shall we try another figure of the Lobster Quadrille?' the +Gryphon went on. `Or would you like the Mock Turtle to sing you +a song?' + + `Oh, a song, please, if the Mock Turtle would be so kind,' +Alice replied, so eagerly that the Gryphon said, in a rather +offended tone, `Hm! No accounting for tastes! Sing her +"Turtle Soup," will you, old fellow?' + + The Mock Turtle sighed deeply, and began, in a voice sometimes +choked with sobs, to sing this:-- + + + `Beautiful Soup, so rich and green, + Waiting in a hot tureen! + Who for such dainties would not stoop? + Soup of the evening, beautiful Soup! + Soup of the evening, beautiful Soup! + Beau--ootiful Soo--oop! + Beau--ootiful Soo--oop! + Soo--oop of the e--e--evening, + Beautiful, beautiful Soup! + + `Beautiful Soup! Who cares for fish, + Game, or any other dish? + Who would not give all else for two + Pennyworth only of beautiful Soup? + Pennyworth only of beautiful Soup? + Beau--ootiful Soo--oop! + Beau--ootiful Soo--oop! + Soo--oop of the e--e--evening, + Beautiful, beauti--FUL SOUP!' + + `Chorus again!' cried the Gryphon, and the Mock Turtle had +just begun to repeat it, when a cry of `The trial's beginning!' +was heard in the distance. + + `Come on!' cried the Gryphon, and, taking Alice by the hand, +it hurried off, without waiting for the end of the song. + + `What trial is it?' Alice panted as she ran; but the Gryphon +only answered `Come on!' and ran the faster, while more and more +faintly came, carried on the breeze that followed them, the +melancholy words:-- + + `Soo--oop of the e--e--evening, + Beautiful, beautiful Soup!' + + + + CHAPTER XI + + Who Stole the Tarts? + + + The King and Queen of Hearts were seated on their throne when +they arrived, with a great crowd assembled about them--all sorts +of little birds and beasts, as well as the whole pack of cards: +the Knave was standing before them, in chains, with a soldier on +each side to guard him; and near the King was the White Rabbit, +with a trumpet in one hand, and a scroll of parchment in the +other. In the very middle of the court was a table, with a large +dish of tarts upon it: they looked so good, that it made Alice +quite hungry to look at them--`I wish they'd get the trial done,' +she thought, `and hand round the refreshments!' But there seemed +to be no chance of this, so she began looking at everything about +her, to pass away the time. + + Alice had never been in a court of justice before, but she had +read about them in books, and she was quite pleased to find that +she knew the name of nearly everything there. `That's the +judge,' she said to herself, `because of his great wig.' + + The judge, by the way, was the King; and as he wore his crown +over the wig, (look at the frontispiece if you want to see how he +did it,) he did not look at all comfortable, and it was certainly +not becoming. + + `And that's the jury-box,' thought Alice, `and those twelve +creatures,' (she was obliged to say `creatures,' you see, because +some of them were animals, and some were birds,) `I suppose they +are the jurors.' She said this last word two or three times over +to herself, being rather proud of it: for she thought, and +rightly too, that very few little girls of her age knew the +meaning of it at all. However, `jury-men' would have done just +as well. + + The twelve jurors were all writing very busily on slates. +`What are they doing?' Alice whispered to the Gryphon. `They +can't have anything to put down yet, before the trial's begun.' + + `They're putting down their names,' the Gryphon whispered in +reply, `for fear they should forget them before the end of the +trial.' + + `Stupid things!' Alice began in a loud, indignant voice, but +she stopped hastily, for the White Rabbit cried out, `Silence in +the court!' and the King put on his spectacles and looked +anxiously round, to make out who was talking. + + Alice could see, as well as if she were looking over their +shoulders, that all the jurors were writing down `stupid things!' +on their slates, and she could even make out that one of them +didn't know how to spell `stupid,' and that he had to ask his +neighbour to tell him. `A nice muddle their slates'll be in +before the trial's over!' thought Alice. + + One of the jurors had a pencil that squeaked. This of course, +Alice could not stand, and she went round the court and got +behind him, and very soon found an opportunity of taking it +away. She did it so quickly that the poor little juror (it was +Bill, the Lizard) could not make out at all what had become of +it; so, after hunting all about for it, he was obliged to write +with one finger for the rest of the day; and this was of very +little use, as it left no mark on the slate. + + `Herald, read the accusation!' said the King. + + On this the White Rabbit blew three blasts on the trumpet, and +then unrolled the parchment scroll, and read as follows:-- + + `The Queen of Hearts, she made some tarts, + All on a summer day: + The Knave of Hearts, he stole those tarts, + And took them quite away!' + + `Consider your verdict,' the King said to the jury. + + `Not yet, not yet!' the Rabbit hastily interrupted. `There's +a great deal to come before that!' + + `Call the first witness,' said the King; and the White Rabbit +blew three blasts on the trumpet, and called out, `First +witness!' + + The first witness was the Hatter. He came in with a teacup in +one hand and a piece of bread-and-butter in the other. `I beg +pardon, your Majesty,' he began, `for bringing these in: but I +hadn't quite finished my tea when I was sent for.' + + `You ought to have finished,' said the King. `When did you +begin?' + + The Hatter looked at the March Hare, who had followed him into +the court, arm-in-arm with the Dormouse. `Fourteenth of March, I +think it was,' he said. + + `Fifteenth,' said the March Hare. + + `Sixteenth,' added the Dormouse. + + `Write that down,' the King said to the jury, and the jury +eagerly wrote down all three dates on their slates, and then +added them up, and reduced the answer to shillings and pence. + + `Take off your hat,' the King said to the Hatter. + + `It isn't mine,' said the Hatter. + + `Stolen!' the King exclaimed, turning to the jury, who +instantly made a memorandum of the fact. + + `I keep them to sell,' the Hatter added as an explanation; +`I've none of my own. I'm a hatter.' + + Here the Queen put on her spectacles, and began staring at the +Hatter, who turned pale and fidgeted. + + `Give your evidence,' said the King; `and don't be nervous, or +I'll have you executed on the spot.' + + This did not seem to encourage the witness at all: he kept +shifting from one foot to the other, looking uneasily at the +Queen, and in his confusion he bit a large piece out of his +teacup instead of the bread-and-butter. + + Just at this moment Alice felt a very curious sensation, which +puzzled her a good deal until she made out what it was: she was +beginning to grow larger again, and she thought at first she +would get up and leave the court; but on second thoughts she +decided to remain where she was as long as there was room for +her. + + `I wish you wouldn't squeeze so.' said the Dormouse, who was +sitting next to her. `I can hardly breathe.' + + `I can't help it,' said Alice very meekly: `I'm growing.' + + `You've no right to grow here,' said the Dormouse. + + `Don't talk nonsense,' said Alice more boldly: `you know +you're growing too.' + + `Yes, but I grow at a reasonable pace,' said the Dormouse: +`not in that ridiculous fashion.' And he got up very sulkily +and crossed over to the other side of the court. + + All this time the Queen had never left off staring at the +Hatter, and, just as the Dormouse crossed the court, she said to +one of the officers of the court, `Bring me the list of the +singers in the last concert!' on which the wretched Hatter +trembled so, that he shook both his shoes off. + + `Give your evidence,' the King repeated angrily, `or I'll have +you executed, whether you're nervous or not.' + + `I'm a poor man, your Majesty,' the Hatter began, in a +trembling voice, `--and I hadn't begun my tea--not above a week +or so--and what with the bread-and-butter getting so thin--and +the twinkling of the tea--' + + `The twinkling of the what?' said the King. + + `It began with the tea,' the Hatter replied. + + `Of course twinkling begins with a T!' said the King sharply. +`Do you take me for a dunce? Go on!' + + `I'm a poor man,' the Hatter went on, `and most things +twinkled after that--only the March Hare said--' + + `I didn't!' the March Hare interrupted in a great hurry. + + `You did!' said the Hatter. + + `I deny it!' said the March Hare. + + `He denies it,' said the King: `leave out that part.' + + `Well, at any rate, the Dormouse said--' the Hatter went on, +looking anxiously round to see if he would deny it too: but the +Dormouse denied nothing, being fast asleep. + + `After that,' continued the Hatter, `I cut some more bread- +and-butter--' + + `But what did the Dormouse say?' one of the jury asked. + + `That I can't remember,' said the Hatter. + + `You MUST remember,' remarked the King, `or I'll have you +executed.' + + The miserable Hatter dropped his teacup and bread-and-butter, +and went down on one knee. `I'm a poor man, your Majesty,' he +began. + + `You're a very poor speaker,' said the King. + + Here one of the guinea-pigs cheered, and was immediately +suppressed by the officers of the court. (As that is rather a +hard word, I will just explain to you how it was done. They had +a large canvas bag, which tied up at the mouth with strings: +into this they slipped the guinea-pig, head first, and then sat +upon it.) + + `I'm glad I've seen that done,' thought Alice. `I've so often +read in the newspapers, at the end of trials, "There was some +attempts at applause, which was immediately suppressed by the +officers of the court," and I never understood what it meant +till now.' + + `If that's all you know about it, you may stand down,' +continued the King. + + `I can't go no lower,' said the Hatter: `I'm on the floor, as +it is.' + + `Then you may SIT down,' the King replied. + + Here the other guinea-pig cheered, and was suppressed. + + `Come, that finished the guinea-pigs!' thought Alice. `Now we +shall get on better.' + + `I'd rather finish my tea,' said the Hatter, with an anxious +look at the Queen, who was reading the list of singers. + + `You may go,' said the King, and the Hatter hurriedly left the +court, without even waiting to put his shoes on. + + `--and just take his head off outside,' the Queen added to one +of the officers: but the Hatter was out of sight before the +officer could get to the door. + + `Call the next witness!' said the King. + + The next witness was the Duchess's cook. She carried the +pepper-box in her hand, and Alice guessed who it was, even before +she got into the court, by the way the people near the door began +sneezing all at once. + + `Give your evidence,' said the King. + + `Shan't,' said the cook. + + The King looked anxiously at the White Rabbit, who said in a +low voice, `Your Majesty must cross-examine THIS witness.' + + `Well, if I must, I must,' the King said, with a melancholy +air, and, after folding his arms and frowning at the cook till +his eyes were nearly out of sight, he said in a deep voice, `What +are tarts made of?' + + `Pepper, mostly,' said the cook. + + `Treacle,' said a sleepy voice behind her. + + `Collar that Dormouse,' the Queen shrieked out. `Behead that +Dormouse! Turn that Dormouse out of court! Suppress him! Pinch +him! Off with his whiskers!' + + For some minutes the whole court was in confusion, getting the +Dormouse turned out, and, by the time they had settled down +again, the cook had disappeared. + + `Never mind!' said the King, with an air of great relief. +`Call the next witness.' And he added in an undertone to the +Queen, `Really, my dear, YOU must cross-examine the next witness. +It quite makes my forehead ache!' + + Alice watched the White Rabbit as he fumbled over the list, +feeling very curious to see what the next witness would be like, +`--for they haven't got much evidence YET,' she said to herself. +Imagine her surprise, when the White Rabbit read out, at the top +of his shrill little voice, the name `Alice!' + + + + CHAPTER XII + + Alice's Evidence + + + `Here!' cried Alice, quite forgetting in the flurry of the +moment how large she had grown in the last few minutes, and she +jumped up in such a hurry that she tipped over the jury-box with +the edge of her skirt, upsetting all the jurymen on to the heads +of the crowd below, and there they lay sprawling about, reminding +her very much of a globe of goldfish she had accidentally upset +the week before. + + `Oh, I BEG your pardon!' she exclaimed in a tone of great +dismay, and began picking them up again as quickly as she could, +for the accident of the goldfish kept running in her head, and +she had a vague sort of idea that they must be collected at once +and put back into the jury-box, or they would die. + + `The trial cannot proceed,' said the King in a very grave +voice, `until all the jurymen are back in their proper places-- +ALL,' he repeated with great emphasis, looking hard at Alice as +he said do. + + Alice looked at the jury-box, and saw that, in her haste, she +had put the Lizard in head downwards, and the poor little thing +was waving its tail about in a melancholy way, being quite unable +to move. She soon got it out again, and put it right; `not that +it signifies much,' she said to herself; `I should think it +would be QUITE as much use in the trial one way up as the other.' + + As soon as the jury had a little recovered from the shock of +being upset, and their slates and pencils had been found and +handed back to them, they set to work very diligently to write +out a history of the accident, all except the Lizard, who seemed +too much overcome to do anything but sit with its mouth open, +gazing up into the roof of the court. + + `What do you know about this business?' the King said to +Alice. + + `Nothing,' said Alice. + + `Nothing WHATEVER?' persisted the King. + + `Nothing whatever,' said Alice. + + `That's very important,' the King said, turning to the jury. +They were just beginning to write this down on their slates, when +the White Rabbit interrupted: `UNimportant, your Majesty means, +of course,' he said in a very respectful tone, but frowning and +making faces at him as he spoke. + + `UNimportant, of course, I meant,' the King hastily said, and +went on to himself in an undertone, `important--unimportant-- +unimportant--important--' as if he were trying which word +sounded best. + + Some of the jury wrote it down `important,' and some +`unimportant.' Alice could see this, as she was near enough to +look over their slates; `but it doesn't matter a bit,' she +thought to herself. + + At this moment the King, who had been for some time busily +writing in his note-book, cackled out `Silence!' and read out +from his book, `Rule Forty-two. ALL PERSONS MORE THAN A MILE +HIGH TO LEAVE THE COURT.' + + Everybody looked at Alice. + + `I'M not a mile high,' said Alice. + + `You are,' said the King. + + `Nearly two miles high,' added the Queen. + + `Well, I shan't go, at any rate,' said Alice: `besides, +that's not a regular rule: you invented it just now.' + + `It's the oldest rule in the book,' said the King. + + `Then it ought to be Number One,' said Alice. + + The King turned pale, and shut his note-book hastily. +`Consider your verdict,' he said to the jury, in a low, trembling +voice. + + `There's more evidence to come yet, please your Majesty,' said +the White Rabbit, jumping up in a great hurry; `this paper has +just been picked up.' + + `What's in it?' said the Queen. + + `I haven't opened it yet,' said the White Rabbit, `but it seems +to be a letter, written by the prisoner to--to somebody.' + + `It must have been that,' said the King, `unless it was +written to nobody, which isn't usual, you know.' + + `Who is it directed to?' said one of the jurymen. + + `It isn't directed at all,' said the White Rabbit; `in fact, +there's nothing written on the OUTSIDE.' He unfolded the paper +as he spoke, and added `It isn't a letter, after all: it's a set +of verses.' + + `Are they in the prisoner's handwriting?' asked another of +the jurymen. + + `No, they're not,' said the White Rabbit, `and that's the +queerest thing about it.' (The jury all looked puzzled.) + + `He must have imitated somebody else's hand,' said the King. +(The jury all brightened up again.) + + `Please your Majesty,' said the Knave, `I didn't write it, and +they can't prove I did: there's no name signed at the end.' + + `If you didn't sign it,' said the King, `that only makes the +matter worse. You MUST have meant some mischief, or else you'd +have signed your name like an honest man.' + + There was a general clapping of hands at this: it was the +first really clever thing the King had said that day. + + `That PROVES his guilt,' said the Queen. + + `It proves nothing of the sort!' said Alice. `Why, you don't +even know what they're about!' + + `Read them,' said the King. + + The White Rabbit put on his spectacles. `Where shall I begin, +please your Majesty?' he asked. + + `Begin at the beginning,' the King said gravely, `and go on +till you come to the end: then stop.' + + These were the verses the White Rabbit read:-- + + `They told me you had been to her, + And mentioned me to him: + She gave me a good character, + But said I could not swim. + + He sent them word I had not gone + (We know it to be true): + If she should push the matter on, + What would become of you? + + I gave her one, they gave him two, + You gave us three or more; + They all returned from him to you, + Though they were mine before. + + If I or she should chance to be + Involved in this affair, + He trusts to you to set them free, + Exactly as we were. + + My notion was that you had been + (Before she had this fit) + An obstacle that came between + Him, and ourselves, and it. + + Don't let him know she liked them best, + For this must ever be + A secret, kept from all the rest, + Between yourself and me.' + + `That's the most important piece of evidence we've heard yet,' +said the King, rubbing his hands; `so now let the jury--' + + `If any one of them can explain it,' said Alice, (she had +grown so large in the last few minutes that she wasn't a bit +afraid of interrupting him,) `I'll give him sixpence. _I_ don't +believe there's an atom of meaning in it.' + + The jury all wrote down on their slates, `SHE doesn't believe +there's an atom of meaning in it,' but none of them attempted to +explain the paper. + + `If there's no meaning in it,' said the King, `that saves a +world of trouble, you know, as we needn't try to find any. And +yet I don't know,' he went on, spreading out the verses on his +knee, and looking at them with one eye; `I seem to see some +meaning in them, after all. "--SAID I COULD NOT SWIM--" you +can't swim, can you?' he added, turning to the Knave. + + The Knave shook his head sadly. `Do I look like it?' he said. +(Which he certainly did NOT, being made entirely of cardboard.) + + `All right, so far,' said the King, and he went on muttering +over the verses to himself: `"WE KNOW IT TO BE TRUE--" that's +the jury, of course-- "I GAVE HER ONE, THEY GAVE HIM TWO--" why, +that must be what he did with the tarts, you know--' + + `But, it goes on "THEY ALL RETURNED FROM HIM TO YOU,"' said +Alice. + + `Why, there they are!' said the King triumphantly, pointing to +the tarts on the table. `Nothing can be clearer than THAT. +Then again--"BEFORE SHE HAD THIS FIT--" you never had fits, my +dear, I think?' he said to the Queen. + + `Never!' said the Queen furiously, throwing an inkstand at the +Lizard as she spoke. (The unfortunate little Bill had left off +writing on his slate with one finger, as he found it made no +mark; but he now hastily began again, using the ink, that was +trickling down his face, as long as it lasted.) + + `Then the words don't FIT you,' said the King, looking round +the court with a smile. There was a dead silence. + + `It's a pun!' the King added in an offended tone, and +everybody laughed, `Let the jury consider their verdict,' the +King said, for about the twentieth time that day. + + `No, no!' said the Queen. `Sentence first--verdict afterwards.' + + `Stuff and nonsense!' said Alice loudly. `The idea of having +the sentence first!' + + `Hold your tongue!' said the Queen, turning purple. + + `I won't!' said Alice. + + `Off with her head!' the Queen shouted at the top of her voice. +Nobody moved. + + `Who cares for you?' said Alice, (she had grown to her full +size by this time.) `You're nothing but a pack of cards!' + + At this the whole pack rose up into the air, and came flying +down upon her: she gave a little scream, half of fright and half +of anger, and tried to beat them off, and found herself lying on +the bank, with her head in the lap of her sister, who was gently +brushing away some dead leaves that had fluttered down from the +trees upon her face. + + `Wake up, Alice dear!' said her sister; `Why, what a long +sleep you've had!' + + `Oh, I've had such a curious dream!' said Alice, and she told +her sister, as well as she could remember them, all these strange +Adventures of hers that you have just been reading about; and +when she had finished, her sister kissed her, and said, `It WAS a +curious dream, dear, certainly: but now run in to your tea; it's +getting late.' So Alice got up and ran off, thinking while she +ran, as well she might, what a wonderful dream it had been. + + But her sister sat still just as she left her, leaning her +head on her hand, watching the setting sun, and thinking of +little Alice and all her wonderful Adventures, till she too began +dreaming after a fashion, and this was her dream:-- + + First, she dreamed of little Alice herself, and once again the +tiny hands were clasped upon her knee, and the bright eager eyes +were looking up into hers--she could hear the very tones of her +voice, and see that queer little toss of her head to keep back +the wandering hair that WOULD always get into her eyes--and +still as she listened, or seemed to listen, the whole place +around her became alive the strange creatures of her little +sister's dream. + + The long grass rustled at her feet as the White Rabbit hurried +by--the frightened Mouse splashed his way through the +neighbouring pool--she could hear the rattle of the teacups as +the March Hare and his friends shared their never-ending meal, +and the shrill voice of the Queen ordering off her unfortunate +guests to execution--once more the pig-baby was sneezing on the +Duchess's knee, while plates and dishes crashed around it--once +more the shriek of the Gryphon, the squeaking of the Lizard's +slate-pencil, and the choking of the suppressed guinea-pigs, +filled the air, mixed up with the distant sobs of the miserable +Mock Turtle. + + So she sat on, with closed eyes, and half believed herself in +Wonderland, though she knew she had but to open them again, and +all would change to dull reality--the grass would be only +rustling in the wind, and the pool rippling to the waving of the +reeds--the rattling teacups would change to tinkling sheep- +bells, and the Queen's shrill cries to the voice of the shepherd +boy--and the sneeze of the baby, the shriek of the Gryphon, and +all the other queer noises, would change (she knew) to the +confused clamour of the busy farm-yard--while the lowing of the +cattle in the distance would take the place of the Mock Turtle's +heavy sobs. + + Lastly, she pictured to herself how this same little sister of +hers would, in the after-time, be herself a grown woman; and how +she would keep, through all her riper years, the simple and +loving heart of her childhood: and how she would gather about +her other little children, and make THEIR eyes bright and eager +with many a strange tale, perhaps even with the dream of +Wonderland of long ago: and how she would feel with all their +simple sorrows, and find a pleasure in all their simple joys, +remembering her own child-life, and the happy summer days. + + THE END diff --git a/Assignments/Assignment08/lisens_peter_pan.txt b/Assignments/Assignment08/lisens_peter_pan.txt new file mode 100644 index 0000000..2e47dcf --- /dev/null +++ b/Assignments/Assignment08/lisens_peter_pan.txt @@ -0,0 +1,399 @@ +End of the Project Gutenberg EBook of Peter Pan, by James M. Barrie + +*** END OF THIS PROJECT GUTENBERG EBOOK PETER PAN *** + +***** This file should be named 16-0.txt or 16-0.zip ***** +This and all associated files of various formats will be found in: + http://www.gutenberg.org/1/16/ + + + +Updated editions will replace the previous one--the old editions will be +renamed. + +Creating the works from public domain print editions means that no one +owns a United States copyright in these works, so the Foundation (and +you!) can copy and distribute it in the United States without permission +and without paying copyright royalties. Special rules, set forth in the +General Terms of Use part of this license, apply to copying and +distributing Project Gutenberg-tm electronic works to protect the +PROJECT GUTENBERG-tm concept and trademark. Project Gutenberg is a +registered trademark, and may not be used if you charge for the eBooks, +unless you receive specific permission. If you do not charge anything +for copies of this eBook, complying with the rules is very easy. You may +use this eBook for nearly any purpose such as creation of derivative +works, reports, performances and research. They may be modified and +printed and given away--you may do practically ANYTHING with public +domain eBooks. Redistribution is subject to the trademark license, +especially commercial redistribution. + + + +*** START: FULL LICENSE *** + +THE FULL PROJECT GUTENBERG LICENSE +PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK + +To protect the Project Gutenberg-tm mission of promoting the free +distribution of electronic works, by using or distributing this work +(or any other work associated in any way with the phrase “Project +Gutenberg”), you agree to comply with all the terms of the Full Project +Gutenberg-tm License (available with this file or online at +http://www.gutenberg.org/license). + + +Section 1. General Terms of Use and Redistributing Project Gutenberg-tm +electronic works + +1.A. By reading or using any part of this Project Gutenberg-tm +electronic work, you indicate that you have read, understand, agree to +and accept all the terms of this license and intellectual property +(trademark/copyright) agreement. If you do not agree to abide by all +the terms of this agreement, you must cease using and return or destroy +all copies of Project Gutenberg-tm electronic works in your possession. +If you paid a fee for obtaining a copy of or access to a Project +Gutenberg-tm electronic work and you do not agree to be bound by the +terms of this agreement, you may obtain a refund from the person or +entity to whom you paid the fee as set forth in paragraph 1.E.8. + +1.B. “Project Gutenberg” is a registered trademark. It may only be +used on or associated in any way with an electronic work by people who +agree to be bound by the terms of this agreement. There are a few +things that you can do with most Project Gutenberg-tm electronic works +even without complying with the full terms of this agreement. See +paragraph 1.C below. There are a lot of things you can do with Project +Gutenberg-tm electronic works if you follow the terms of this agreement +and help preserve free future access to Project Gutenberg-tm electronic +works. See paragraph 1.E below. + +1.C. The Project Gutenberg Literary Archive Foundation (“the Foundation” + or PGLAF), owns a compilation copyright in the collection of Project +Gutenberg-tm electronic works. Nearly all the individual works in the +collection are in the public domain in the United States. If an +individual work is in the public domain in the United States and you are +located in the United States, we do not claim a right to prevent you from +copying, distributing, performing, displaying or creating derivative +works based on the work as long as all references to Project Gutenberg +are removed. Of course, we hope that you will support the Project +Gutenberg-tm mission of promoting free access to electronic works by +freely sharing Project Gutenberg-tm works in compliance with the terms of +this agreement for keeping the Project Gutenberg-tm name associated with +the work. You can easily comply with the terms of this agreement by +keeping this work in the same format with its attached full Project +Gutenberg-tm License when you share it without charge with others. +This particular work is one of the few copyrighted individual works +included with the permission of the copyright holder. Information on +the copyright owner for this particular work and the terms of use +imposed by the copyright holder on this work are set forth at the +beginning of this work. + +1.D. The copyright laws of the place where you are located also govern +what you can do with this work. Copyright laws in most countries are in +a constant state of change. If you are outside the United States, check +the laws of your country in addition to the terms of this agreement +before downloading, copying, displaying, performing, distributing or +creating derivative works based on this work or any other Project +Gutenberg-tm work. The Foundation makes no representations concerning +the copyright status of any work in any country outside the United +States. + +1.E. Unless you have removed all references to Project Gutenberg: + +1.E.1. The following sentence, with active links to, or other immediate +access to, the full Project Gutenberg-tm License must appear prominently +whenever any copy of a Project Gutenberg-tm work (any work on which the +phrase “Project Gutenberg” appears, or with which the phrase “Project +Gutenberg” is associated) is accessed, displayed, performed, viewed, +copied or distributed: + +This eBook is for the use of anyone anywhere at no cost and with +almost no restrictions whatsoever. You may copy it, give it away or +re-use it under the terms of the Project Gutenberg License included +with this eBook or online at www.gutenberg.org + +1.E.2. If an individual Project Gutenberg-tm electronic work is derived +from the public domain (does not contain a notice indicating that it is +posted with permission of the copyright holder), the work can be copied +and distributed to anyone in the United States without paying any fees +or charges. If you are redistributing or providing access to a work +with the phrase “Project Gutenberg” associated with or appearing on the +work, you must comply either with the requirements of paragraphs 1.E.1 +through 1.E.7 or obtain permission for the use of the work and the +Project Gutenberg-tm trademark as set forth in paragraphs 1.E.8 or +1.E.9. + +1.E.3. If an individual Project Gutenberg-tm electronic work is posted +with the permission of the copyright holder, your use and distribution +must comply with both paragraphs 1.E.1 through 1.E.7 and any additional +terms imposed by the copyright holder. Additional terms will be linked +to the Project Gutenberg-tm License for all works posted with the +permission of the copyright holder found at the beginning of this work. + +1.E.4. Do not unlink or detach or remove the full Project Gutenberg-tm +License terms from this work, or any files containing a part of this +work or any other work associated with Project Gutenberg-tm. + +1.E.5. Do not copy, display, perform, distribute or redistribute this +electronic work, or any part of this electronic work, without +prominently displaying the sentence set forth in paragraph 1.E.1 with +active links or immediate access to the full terms of the Project +Gutenberg-tm License. + +1.E.6. You may convert to and distribute this work in any binary, +compressed, marked up, nonproprietary or proprietary form, including any +word processing or hypertext form. However, if you provide access to or +distribute copies of a Project Gutenberg-tm work in a format other than +“Plain Vanilla ASCII” or other format used in the official version +posted on the official Project Gutenberg-tm web site (www.gutenberg.org), +you must, at no additional cost, fee or expense to the user, provide a +copy, a means of exporting a copy, or a means of obtaining a copy upon +request, of the work in its original “Plain Vanilla ASCII” or other +form. Any alternate format must include the full Project Gutenberg-tm +License as specified in paragraph 1.E.1. + +1.E.7. Do not charge a fee for access to, viewing, displaying, +performing, copying or distributing any Project Gutenberg-tm works +unless you comply with paragraph 1.E.8 or 1.E.9. + +1.E.8. You may charge a reasonable fee for copies of or providing +access to or distributing Project Gutenberg-tm electronic works provided +that + +- You pay a royalty fee of 20% of the gross profits you derive from + the use of Project Gutenberg-tm works calculated using the method + you already use to calculate your applicable taxes. The fee is + owed to the owner of the Project Gutenberg-tm trademark, but he + has agreed to donate royalties under this paragraph to the + Project Gutenberg Literary Archive Foundation. Royalty payments + must be paid within 60 days following each date on which you + prepare (or are legally required to prepare) your periodic tax + returns. Royalty payments should be clearly marked as such and + sent to the Project Gutenberg Literary Archive Foundation at the + address specified in Section 4, “Information about donations to + the Project Gutenberg Literary Archive Foundation.” + +- You provide a full refund of any money paid by a user who notifies + you in writing (or by e-mail) within 30 days of receipt that s/he + does not agree to the terms of the full Project Gutenberg-tm + License. You must require such a user to return or + destroy all copies of the works possessed in a physical medium + and discontinue all use of and all access to other copies of + Project Gutenberg-tm works. + +- You provide, in accordance with paragraph 1.F.3, a full refund of any + money paid for a work or a replacement copy, if a defect in the + electronic work is discovered and reported to you within 90 days + of receipt of the work. + +- You comply with all other terms of this agreement for free + distribution of Project Gutenberg-tm works. + +1.E.9. If you wish to charge a fee or distribute a Project Gutenberg-tm +electronic work or group of works on different terms than are set +forth in this agreement, you must obtain permission in writing from +both the Project Gutenberg Literary Archive Foundation and Michael +Hart, the owner of the Project Gutenberg-tm trademark. Contact the +Foundation as set forth in Section 3 below. + +1.F. + +1.F.1. Project Gutenberg volunteers and employees expend considerable +effort to identify, do copyright research on, transcribe and proofread +public domain works in creating the Project Gutenberg-tm +collection. Despite these efforts, Project Gutenberg-tm electronic +works, and the medium on which they may be stored, may contain +“Defects,” such as, but not limited to, incomplete, inaccurate or +corrupt data, transcription errors, a copyright or other intellectual +property infringement, a defective or damaged disk or other medium, a +computer virus, or computer codes that damage or cannot be read by +your equipment. + +1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except for the “Right +of Replacement or Refund” described in paragraph 1.F.3, the Project +Gutenberg Literary Archive Foundation, the owner of the Project +Gutenberg-tm trademark, and any other party distributing a Project +Gutenberg-tm electronic work under this agreement, disclaim all +liability to you for damages, costs and expenses, including legal +fees. YOU AGREE THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE, STRICT +LIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT EXCEPT THOSE +PROVIDED IN PARAGRAPH F3. YOU AGREE THAT THE FOUNDATION, THE +TRADEMARK OWNER, AND ANY DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE +LIABLE TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE OR +INCIDENTAL DAMAGES EVEN IF YOU GIVE NOTICE OF THE POSSIBILITY OF SUCH +DAMAGE. + +1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you discover a +defect in this electronic work within 90 days of receiving it, you can +receive a refund of the money (if any) you paid for it by sending a +written explanation to the person you received the work from. If you +received the work on a physical medium, you must return the medium with +your written explanation. The person or entity that provided you with +the defective work may elect to provide a replacement copy in lieu of a +refund. If you received the work electronically, the person or entity +providing it to you may choose to give you a second opportunity to +receive the work electronically in lieu of a refund. If the second copy +is also defective, you may demand a refund in writing without further +opportunities to fix the problem. + +1.F.4. Except for the limited right of replacement or refund set forth +in paragraph 1.F.3, this work is provided to you 'AS-IS,' WITH NO OTHER +WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO +WARRANTIES OF MERCHANTIBILITY OR FITNESS FOR ANY PURPOSE. + +1.F.5. Some states do not allow disclaimers of certain implied +warranties or the exclusion or limitation of certain types of damages. +If any disclaimer or limitation set forth in this agreement violates the +law of the state applicable to this agreement, the agreement shall be +interpreted to make the maximum disclaimer or limitation permitted by +the applicable state law. The invalidity or unenforceability of any +provision of this agreement shall not void the remaining provisions. + +1.F.6. INDEMNITY - You agree to indemnify and hold the Foundation, the +trademark owner, any agent or employee of the Foundation, anyone +providing copies of Project Gutenberg-tm electronic works in accordance +with this agreement, and any volunteers associated with the production, +promotion and distribution of Project Gutenberg-tm electronic works, +harmless from all liability, costs and expenses, including legal fees, +that arise directly or indirectly from any of the following which you do +or cause to occur: (a) distribution of this or any Project Gutenberg-tm +work, (b) alteration, modification, or additions or deletions to any +Project Gutenberg-tm work, and (c) any Defect you cause. + + +Section 2. Information about the Mission of Project Gutenberg-tm + +Project Gutenberg-tm is synonymous with the free distribution of +electronic works in formats readable by the widest variety of computers +including obsolete, old, middle-aged and new computers. It exists +because of the efforts of hundreds of volunteers and donations from +people in all walks of life. + +Volunteers and financial support to provide volunteers with the +assistance they need, is critical to reaching Project Gutenberg-tm's +goals and ensuring that the Project Gutenberg-tm collection will +remain freely available for generations to come. In 2001, the Project +Gutenberg Literary Archive Foundation was created to provide a secure +and permanent future for Project Gutenberg-tm and future generations. +To learn more about the Project Gutenberg Literary Archive Foundation +and how your efforts and donations can help, see Sections 3 and 4 +and the Foundation web page at http://www.pglaf.org. + + +Section 3. Information about the Project Gutenberg Literary Archive +Foundation + +The Project Gutenberg Literary Archive Foundation is a non profit +501(c)(3) educational corporation organized under the laws of the +state of Mississippi and granted tax exempt status by the Internal +Revenue Service. The Foundation's EIN or federal tax identification +number is 64-6221541. Its 501(c)(3) letter is posted at +http://pglaf.org/fundraising. Contributions to the Project Gutenberg +Literary Archive Foundation are tax deductible to the full extent +permitted by U.S. federal laws and your state's laws. + +The Foundation's principal office is located at 4557 Melan Dr. S. +Fairbanks, AK, 99712., but its volunteers and employees are scattered +throughout numerous locations. Its business office is located at +809 North 1500 West, Salt Lake City, UT 84116, (801) 596-1887, email +business@pglaf.org. Email contact links and up to date contact +information can be found at the Foundation's web site and official +page at http://pglaf.org + +For additional contact information: + Dr. Gregory B. Newby + Chief Executive and Director + gbnewby@pglaf.org + +Section 4. Information about Donations to the Project Gutenberg +Literary Archive Foundation + +Project Gutenberg-tm depends upon and cannot survive without wide +spread public support and donations to carry out its mission of +increasing the number of public domain and licensed works that can be +freely distributed in machine readable form accessible by the widest +array of equipment including outdated equipment. Many small donations +($1 to $5,000) are particularly important to maintaining tax exempt +status with the IRS. + +The Foundation is committed to complying with the laws regulating +charities and charitable donations in all 50 states of the United +States. Compliance requirements are not uniform and it takes a +considerable effort, much paperwork and many fees to meet and keep up +with these requirements. We do not solicit donations in locations +where we have not received written confirmation of compliance. To +SEND DONATIONS or determine the status of compliance for any +particular state visit http://pglaf.org + +While we cannot and do not solicit contributions from states where we +have not met the solicitation requirements, we know of no prohibition +against accepting unsolicited donations from donors in such states who +approach us with offers to donate. + +International donations are gratefully accepted, but we cannot make +any statements concerning tax treatment of donations received from +outside the United States. U.S. laws alone swamp our small staff. + +Please check the Project Gutenberg Web pages for current donation +methods and addresses. Donations are accepted in a number of other +ways including checks, online payments and credit card donations. +To donate, please visit: http://pglaf.org/donate + + +Section 5. General Information About Project Gutenberg-tm electronic +works. + +Professor Michael S. Hart is the originator of the Project Gutenberg-tm +concept of a library of electronic works that could be freely shared +with anyone. For thirty years, he produced and distributed Project +Gutenberg-tm eBooks with only a loose network of volunteer support. + +Project Gutenberg-tm eBooks are often created from several printed +editions, all of which are confirmed as Public Domain in the U.S. +unless a copyright notice is included. Thus, we do not necessarily +keep eBooks in compliance with any particular paper edition. + +Each eBook is in a subdirectory of the same number as the eBook's +eBook number, often in several formats including plain vanilla ASCII, +compressed (zipped), HTML and others. + +Corrected EDITIONS of our eBooks replace the old file and take over +the old filename and etext number. The replaced older file is renamed. +VERSIONS based on separate sources are treated as new eBooks receiving +new filenames and etext numbers. + +Most people start at our Web site which has the main PG search facility: + +http://www.gutenberg.org + +This Web site includes information about Project Gutenberg-tm, +including how to make donations to the Project Gutenberg Literary +Archive Foundation, how to help produce our new eBooks, and how to +subscribe to our email newsletter to hear about new eBooks. + +EBooks posted prior to November 2003, with eBook numbers BELOW #10000, +are filed in directories based on their release date. If you want to +download any of these eBooks directly, rather than using the regular +search system you may utilize the following addresses and just +download by the etext year. + +http://www.ibiblio.org/gutenberg/etext06 + + (Or /etext 05, 04, 03, 02, 01, 00, 99, + 98, 97, 96, 95, 94, 93, 92, 92, 91 or 90) + +EBooks posted since November 2003, with etext numbers OVER #10000, are +filed in a different way. The year of a release date is no longer part +of the directory path. The path is based on the etext number (which is +identical to the filename). The path to the file is made up of single +digits corresponding to all but the last digit in the filename. For +example an eBook of filename 10234 would be found at: + +http://www.gutenberg.org/1/0/2/3/10234 + +or filename 24689 would be found at: +http://www.gutenberg.org/2/4/6/8/24689 + +An alternative method of locating eBooks: +http://www.gutenberg.org/GUTINDEX.ALL + +*** END: FULL LICENSE *** diff --git a/Assignments/Assignment08/peter_pan.txt b/Assignments/Assignment08/peter_pan.txt new file mode 100644 index 0000000..78d11b7 --- /dev/null +++ b/Assignments/Assignment08/peter_pan.txt @@ -0,0 +1,6195 @@ +The Project Gutenberg EBook of Peter Pan, by James M. Barrie + +This eBook is for the use of anyone anywhere at no cost and with +almost no restrictions whatsoever. You may copy it, give it away or +re-use it under the terms of the Project Gutenberg License included +with this eBook or online at www.gutenberg.org + +** This is a COPYRIGHTED Project Gutenberg eBook, Details Below ** +** Please follow the copyright guidelines in this file. ** + +Title: Peter Pan + Peter Pan and Wendy + +Author: James M. Barrie + +Posting Date: June 25, 2008 [EBook #16] +Release Date: July, 1991 +Last Updated: March 10, 2018 + +Language: English + +Character set encoding: UTF-8 + +*** START OF THIS PROJECT GUTENBERG EBOOK PETER PAN *** + + +PETER PAN + +[PETER AND WENDY] + +By J. M. Barrie [James Matthew Barrie] + +A Millennium Fulcrum Edition (c)1991 by Duncan Research + +Chapter 1 PETER BREAKS THROUGH + +All children, except one, grow up. They soon know that they will grow +up, and the way Wendy knew was this. One day when she was two years old +she was playing in a garden, and she plucked another flower and ran with +it to her mother. I suppose she must have looked rather delightful, for +Mrs. Darling put her hand to her heart and cried, “Oh, why can't you +remain like this for ever!” This was all that passed between them on +the subject, but henceforth Wendy knew that she must grow up. You always +know after you are two. Two is the beginning of the end. + +Of course they lived at 14 [their house number on their street], and +until Wendy came her mother was the chief one. She was a lovely lady, +with a romantic mind and such a sweet mocking mouth. Her romantic +mind was like the tiny boxes, one within the other, that come from the +puzzling East, however many you discover there is always one more; and +her sweet mocking mouth had one kiss on it that Wendy could never get, +though there it was, perfectly conspicuous in the right-hand corner. + +The way Mr. Darling won her was this: the many gentlemen who had been +boys when she was a girl discovered simultaneously that they loved her, +and they all ran to her house to propose to her except Mr. Darling, who +took a cab and nipped in first, and so he got her. He got all of her, +except the innermost box and the kiss. He never knew about the box, and +in time he gave up trying for the kiss. Wendy thought Napoleon could +have got it, but I can picture him trying, and then going off in a +passion, slamming the door. + +Mr. Darling used to boast to Wendy that her mother not only loved him +but respected him. He was one of those deep ones who know about stocks +and shares. Of course no one really knows, but he quite seemed to know, +and he often said stocks were up and shares were down in a way that +would have made any woman respect him. + +Mrs. Darling was married in white, and at first she kept the books +perfectly, almost gleefully, as if it were a game, not so much as a +Brussels sprout was missing; but by and by whole cauliflowers dropped +out, and instead of them there were pictures of babies without faces. +She drew them when she should have been totting up. They were Mrs. +Darling's guesses. + +Wendy came first, then John, then Michael. + +For a week or two after Wendy came it was doubtful whether they would +be able to keep her, as she was another mouth to feed. Mr. Darling was +frightfully proud of her, but he was very honourable, and he sat on the +edge of Mrs. Darling's bed, holding her hand and calculating expenses, +while she looked at him imploringly. She wanted to risk it, come what +might, but that was not his way; his way was with a pencil and a piece +of paper, and if she confused him with suggestions he had to begin at +the beginning again. + +“Now don't interrupt,” he would beg of her. + +“I have one pound seventeen here, and two and six at the office; I can +cut off my coffee at the office, say ten shillings, making two nine +and six, with your eighteen and three makes three nine seven, with five +naught naught in my cheque-book makes eight nine seven--who is that +moving?--eight nine seven, dot and carry seven--don't speak, my own--and +the pound you lent to that man who came to the door--quiet, child--dot +and carry child--there, you've done it!--did I say nine nine seven? yes, +I said nine nine seven; the question is, can we try it for a year on +nine nine seven?” + +“Of course we can, George,” she cried. But she was prejudiced in Wendy's +favour, and he was really the grander character of the two. + +“Remember mumps,” he warned her almost threateningly, and off he went +again. “Mumps one pound, that is what I have put down, but I daresay +it will be more like thirty shillings--don't speak--measles one five, +German measles half a guinea, makes two fifteen six--don't waggle your +finger--whooping-cough, say fifteen shillings”--and so on it went, and +it added up differently each time; but at last Wendy just got through, +with mumps reduced to twelve six, and the two kinds of measles treated +as one. + +There was the same excitement over John, and Michael had even a narrower +squeak; but both were kept, and soon, you might have seen the three of +them going in a row to Miss Fulsom's Kindergarten school, accompanied by +their nurse. + +Mrs. Darling loved to have everything just so, and Mr. Darling had a +passion for being exactly like his neighbours; so, of course, they had +a nurse. As they were poor, owing to the amount of milk the children +drank, this nurse was a prim Newfoundland dog, called Nana, who had +belonged to no one in particular until the Darlings engaged her. She had +always thought children important, however, and the Darlings had become +acquainted with her in Kensington Gardens, where she spent most of her +spare time peeping into perambulators, and was much hated by careless +nursemaids, whom she followed to their homes and complained of to their +mistresses. She proved to be quite a treasure of a nurse. How thorough +she was at bath-time, and up at any moment of the night if one of her +charges made the slightest cry. Of course her kennel was in the nursery. +She had a genius for knowing when a cough is a thing to have no patience +with and when it needs stocking around your throat. She believed to her +last day in old-fashioned remedies like rhubarb leaf, and made sounds of +contempt over all this new-fangled talk about germs, and so on. It was a +lesson in propriety to see her escorting the children to school, walking +sedately by their side when they were well behaved, and butting them +back into line if they strayed. On John's footer [in England soccer +was called football, “footer” for short] days she never once forgot his +sweater, and she usually carried an umbrella in her mouth in case of +rain. There is a room in the basement of Miss Fulsom's school where the +nurses wait. They sat on forms, while Nana lay on the floor, but that +was the only difference. They affected to ignore her as of an inferior +social status to themselves, and she despised their light talk. She +resented visits to the nursery from Mrs. Darling's friends, but if they +did come she first whipped off Michael's pinafore and put him into the +one with blue braiding, and smoothed out Wendy and made a dash at John's +hair. + +No nursery could possibly have been conducted more correctly, and +Mr. Darling knew it, yet he sometimes wondered uneasily whether the +neighbours talked. + +He had his position in the city to consider. + +Nana also troubled him in another way. He had sometimes a feeling that +she did not admire him. “I know she admires you tremendously, George,” + Mrs. Darling would assure him, and then she would sign to the children +to be specially nice to father. Lovely dances followed, in which the +only other servant, Liza, was sometimes allowed to join. Such a midget +she looked in her long skirt and maid's cap, though she had sworn, when +engaged, that she would never see ten again. The gaiety of those romps! +And gayest of all was Mrs. Darling, who would pirouette so wildly that +all you could see of her was the kiss, and then if you had dashed at her +you might have got it. There never was a simpler happier family until +the coming of Peter Pan. + +Mrs. Darling first heard of Peter when she was tidying up her children's +minds. It is the nightly custom of every good mother after her children +are asleep to rummage in their minds and put things straight for next +morning, repacking into their proper places the many articles that have +wandered during the day. If you could keep awake (but of course you +can't) you would see your own mother doing this, and you would find it +very interesting to watch her. It is quite like tidying up drawers. You +would see her on her knees, I expect, lingering humorously over some of +your contents, wondering where on earth you had picked this thing up, +making discoveries sweet and not so sweet, pressing this to her cheek as +if it were as nice as a kitten, and hurriedly stowing that out of sight. +When you wake in the morning, the naughtiness and evil passions with +which you went to bed have been folded up small and placed at the bottom +of your mind and on the top, beautifully aired, are spread out your +prettier thoughts, ready for you to put on. + +I don't know whether you have ever seen a map of a person's mind. +Doctors sometimes draw maps of other parts of you, and your own map can +become intensely interesting, but catch them trying to draw a map of a +child's mind, which is not only confused, but keeps going round all +the time. There are zigzag lines on it, just like your temperature on a +card, and these are probably roads in the island, for the Neverland is +always more or less an island, with astonishing splashes of colour here +and there, and coral reefs and rakish-looking craft in the offing, and +savages and lonely lairs, and gnomes who are mostly tailors, and caves +through which a river runs, and princes with six elder brothers, and a +hut fast going to decay, and one very small old lady with a hooked nose. +It would be an easy map if that were all, but there is also first day +at school, religion, fathers, the round pond, needle-work, murders, +hangings, verbs that take the dative, chocolate pudding day, getting +into braces, say ninety-nine, three-pence for pulling out your tooth +yourself, and so on, and either these are part of the island or they are +another map showing through, and it is all rather confusing, especially +as nothing will stand still. + +Of course the Neverlands vary a good deal. John's, for instance, had a +lagoon with flamingoes flying over it at which John was shooting, while +Michael, who was very small, had a flamingo with lagoons flying over +it. John lived in a boat turned upside down on the sands, Michael in +a wigwam, Wendy in a house of leaves deftly sewn together. John had no +friends, Michael had friends at night, Wendy had a pet wolf forsaken by +its parents, but on the whole the Neverlands have a family resemblance, +and if they stood still in a row you could say of them that they have +each other's nose, and so forth. On these magic shores children at play +are for ever beaching their coracles [simple boat]. We too have been +there; we can still hear the sound of the surf, though we shall land no +more. + +Of all delectable islands the Neverland is the snuggest and most +compact, not large and sprawly, you know, with tedious distances between +one adventure and another, but nicely crammed. When you play at it by +day with the chairs and table-cloth, it is not in the least alarming, +but in the two minutes before you go to sleep it becomes very real. That +is why there are night-lights. + +Occasionally in her travels through her children's minds Mrs. Darling +found things she could not understand, and of these quite the most +perplexing was the word Peter. She knew of no Peter, and yet he was +here and there in John and Michael's minds, while Wendy's began to be +scrawled all over with him. The name stood out in bolder letters than +any of the other words, and as Mrs. Darling gazed she felt that it had +an oddly cocky appearance. + +“Yes, he is rather cocky,” Wendy admitted with regret. Her mother had +been questioning her. + +“But who is he, my pet?” + +“He is Peter Pan, you know, mother.” + +At first Mrs. Darling did not know, but after thinking back into her +childhood she just remembered a Peter Pan who was said to live with the +fairies. There were odd stories about him, as that when children died he +went part of the way with them, so that they should not be frightened. +She had believed in him at the time, but now that she was married and +full of sense she quite doubted whether there was any such person. + +“Besides,” she said to Wendy, “he would be grown up by this time.” + +“Oh no, he isn't grown up,” Wendy assured her confidently, “and he is +just my size.” She meant that he was her size in both mind and body; she +didn't know how she knew, she just knew it. + +Mrs. Darling consulted Mr. Darling, but he smiled pooh-pooh. “Mark my +words,” he said, “it is some nonsense Nana has been putting into their +heads; just the sort of idea a dog would have. Leave it alone, and it +will blow over.” + +But it would not blow over and soon the troublesome boy gave Mrs. +Darling quite a shock. + +Children have the strangest adventures without being troubled by them. +For instance, they may remember to mention, a week after the event +happened, that when they were in the wood they had met their dead +father and had a game with him. It was in this casual way that Wendy one +morning made a disquieting revelation. Some leaves of a tree had been +found on the nursery floor, which certainly were not there when the +children went to bed, and Mrs. Darling was puzzling over them when Wendy +said with a tolerant smile: + +“I do believe it is that Peter again!” + +“Whatever do you mean, Wendy?” + +“It is so naughty of him not to wipe his feet,” Wendy said, sighing. She +was a tidy child. + +She explained in quite a matter-of-fact way that she thought Peter +sometimes came to the nursery in the night and sat on the foot of her +bed and played on his pipes to her. Unfortunately she never woke, so she +didn't know how she knew, she just knew. + +“What nonsense you talk, precious. No one can get into the house without +knocking.” + +“I think he comes in by the window,” she said. + +“My love, it is three floors up.” + +“Were not the leaves at the foot of the window, mother?” + +It was quite true; the leaves had been found very near the window. + +Mrs. Darling did not know what to think, for it all seemed so natural to +Wendy that you could not dismiss it by saying she had been dreaming. + +“My child,” the mother cried, “why did you not tell me of this before?” + +“I forgot,” said Wendy lightly. She was in a hurry to get her breakfast. + +Oh, surely she must have been dreaming. + +But, on the other hand, there were the leaves. Mrs. Darling examined +them very carefully; they were skeleton leaves, but she was sure they +did not come from any tree that grew in England. She crawled about the +floor, peering at it with a candle for marks of a strange foot. She +rattled the poker up the chimney and tapped the walls. She let down a +tape from the window to the pavement, and it was a sheer drop of thirty +feet, without so much as a spout to climb up by. + +Certainly Wendy had been dreaming. + +But Wendy had not been dreaming, as the very next night showed, the +night on which the extraordinary adventures of these children may be +said to have begun. + +On the night we speak of all the children were once more in bed. It +happened to be Nana's evening off, and Mrs. Darling had bathed them and +sung to them till one by one they had let go her hand and slid away into +the land of sleep. + +All were looking so safe and cosy that she smiled at her fears now and +sat down tranquilly by the fire to sew. + +It was something for Michael, who on his birthday was getting into +shirts. The fire was warm, however, and the nursery dimly lit by three +night-lights, and presently the sewing lay on Mrs. Darling's lap. Then +her head nodded, oh, so gracefully. She was asleep. Look at the four of +them, Wendy and Michael over there, John here, and Mrs. Darling by the +fire. There should have been a fourth night-light. + +While she slept she had a dream. She dreamt that the Neverland had come +too near and that a strange boy had broken through from it. He did not +alarm her, for she thought she had seen him before in the faces of many +women who have no children. Perhaps he is to be found in the faces of +some mothers also. But in her dream he had rent the film that obscures +the Neverland, and she saw Wendy and John and Michael peeping through +the gap. + +The dream by itself would have been a trifle, but while she was dreaming +the window of the nursery blew open, and a boy did drop on the floor. +He was accompanied by a strange light, no bigger than your fist, which +darted about the room like a living thing and I think it must have been +this light that wakened Mrs. Darling. + +She started up with a cry, and saw the boy, and somehow she knew at once +that he was Peter Pan. If you or I or Wendy had been there we should +have seen that he was very like Mrs. Darling's kiss. He was a lovely +boy, clad in skeleton leaves and the juices that ooze out of trees but +the most entrancing thing about him was that he had all his first teeth. +When he saw she was a grown-up, he gnashed the little pearls at her. + + + + +Chapter 2 THE SHADOW + +Mrs. Darling screamed, and, as if in answer to a bell, the door opened, +and Nana entered, returned from her evening out. She growled and sprang +at the boy, who leapt lightly through the window. Again Mrs. Darling +screamed, this time in distress for him, for she thought he was killed, +and she ran down into the street to look for his little body, but it +was not there; and she looked up, and in the black night she could see +nothing but what she thought was a shooting star. + +She returned to the nursery, and found Nana with something in her mouth, +which proved to be the boy's shadow. As he leapt at the window Nana had +closed it quickly, too late to catch him, but his shadow had not had +time to get out; slam went the window and snapped it off. + +You may be sure Mrs. Darling examined the shadow carefully, but it was +quite the ordinary kind. + +Nana had no doubt of what was the best thing to do with this shadow. She +hung it out at the window, meaning “He is sure to come back for it; let +us put it where he can get it easily without disturbing the children.” + +But unfortunately Mrs. Darling could not leave it hanging out at the +window, it looked so like the washing and lowered the whole tone of the +house. She thought of showing it to Mr. Darling, but he was totting up +winter great-coats for John and Michael, with a wet towel around his +head to keep his brain clear, and it seemed a shame to trouble him; +besides, she knew exactly what he would say: “It all comes of having a +dog for a nurse.” + +She decided to roll the shadow up and put it away carefully in a drawer, +until a fitting opportunity came for telling her husband. Ah me! + +The opportunity came a week later, on that never-to-be-forgotten Friday. +Of course it was a Friday. + +“I ought to have been specially careful on a Friday,” she used to say +afterwards to her husband, while perhaps Nana was on the other side of +her, holding her hand. + +“No, no,” Mr. Darling always said, “I am responsible for it all. I, +George Darling, did it. MEA CULPA, MEA CULPA.” He had had a classical +education. + +They sat thus night after night recalling that fatal Friday, till every +detail of it was stamped on their brains and came through on the other +side like the faces on a bad coinage. + +“If only I had not accepted that invitation to dine at 27,” Mrs. Darling +said. + +“If only I had not poured my medicine into Nana's bowl,” said Mr. +Darling. + +“If only I had pretended to like the medicine,” was what Nana's wet eyes +said. + +“My liking for parties, George.” + +“My fatal gift of humour, dearest.” + +“My touchiness about trifles, dear master and mistress.” + +Then one or more of them would break down altogether; Nana at the +thought, “It's true, it's true, they ought not to have had a dog for +a nurse.” Many a time it was Mr. Darling who put the handkerchief to +Nana's eyes. + +“That fiend!” Mr. Darling would cry, and Nana's bark was the echo of +it, but Mrs. Darling never upbraided Peter; there was something in the +right-hand corner of her mouth that wanted her not to call Peter names. + +They would sit there in the empty nursery, recalling fondly every +smallest detail of that dreadful evening. It had begun so uneventfully, +so precisely like a hundred other evenings, with Nana putting on the +water for Michael's bath and carrying him to it on her back. + +“I won't go to bed,” he had shouted, like one who still believed that he +had the last word on the subject, “I won't, I won't. Nana, it isn't six +o'clock yet. Oh dear, oh dear, I shan't love you any more, Nana. I tell +you I won't be bathed, I won't, I won't!” + +Then Mrs. Darling had come in, wearing her white evening-gown. She had +dressed early because Wendy so loved to see her in her evening-gown, +with the necklace George had given her. She was wearing Wendy's bracelet +on her arm; she had asked for the loan of it. Wendy loved to lend her +bracelet to her mother. + +She had found her two older children playing at being herself and father +on the occasion of Wendy's birth, and John was saying: + +“I am happy to inform you, Mrs. Darling, that you are now a mother,” + in just such a tone as Mr. Darling himself may have used on the real +occasion. + +Wendy had danced with joy, just as the real Mrs. Darling must have done. + +Then John was born, with the extra pomp that he conceived due to the +birth of a male, and Michael came from his bath to ask to be born also, +but John said brutally that they did not want any more. + +Michael had nearly cried. “Nobody wants me,” he said, and of course the +lady in the evening-dress could not stand that. + +“I do,” she said, “I so want a third child.” + +“Boy or girl?” asked Michael, not too hopefully. + +“Boy.” + +Then he had leapt into her arms. Such a little thing for Mr. and Mrs. +Darling and Nana to recall now, but not so little if that was to be +Michael's last night in the nursery. + +They go on with their recollections. + +“It was then that I rushed in like a tornado, wasn't it?” Mr. Darling +would say, scorning himself; and indeed he had been like a tornado. + +Perhaps there was some excuse for him. He, too, had been dressing for +the party, and all had gone well with him until he came to his tie. It +is an astounding thing to have to tell, but this man, though he knew +about stocks and shares, had no real mastery of his tie. Sometimes the +thing yielded to him without a contest, but there were occasions when it +would have been better for the house if he had swallowed his pride and +used a made-up tie. + +This was such an occasion. He came rushing into the nursery with the +crumpled little brute of a tie in his hand. + +“Why, what is the matter, father dear?” + +“Matter!” he yelled; he really yelled. “This tie, it will not tie.” He +became dangerously sarcastic. “Not round my neck! Round the bed-post! +Oh yes, twenty times have I made it up round the bed-post, but round my +neck, no! Oh dear no! begs to be excused!” + +He thought Mrs. Darling was not sufficiently impressed, and he went on +sternly, “I warn you of this, mother, that unless this tie is round my +neck we don't go out to dinner to-night, and if I don't go out to dinner +to-night, I never go to the office again, and if I don't go to the +office again, you and I starve, and our children will be flung into the +streets.” + +Even then Mrs. Darling was placid. “Let me try, dear,” she said, and +indeed that was what he had come to ask her to do, and with her nice +cool hands she tied his tie for him, while the children stood around to +see their fate decided. Some men would have resented her being able to +do it so easily, but Mr. Darling had far too fine a nature for that; he +thanked her carelessly, at once forgot his rage, and in another moment +was dancing round the room with Michael on his back. + +“How wildly we romped!” says Mrs. Darling now, recalling it. + +“Our last romp!” Mr. Darling groaned. + +“O George, do you remember Michael suddenly said to me, 'How did you get +to know me, mother?'” + +“I remember!” + +“They were rather sweet, don't you think, George?” + +“And they were ours, ours! and now they are gone.” + +The romp had ended with the appearance of Nana, and most unluckily Mr. +Darling collided against her, covering his trousers with hairs. They +were not only new trousers, but they were the first he had ever had +with braid on them, and he had had to bite his lip to prevent the tears +coming. Of course Mrs. Darling brushed him, but he began to talk again +about its being a mistake to have a dog for a nurse. + +“George, Nana is a treasure.” + +“No doubt, but I have an uneasy feeling at times that she looks upon the +children as puppies.” + +“Oh no, dear one, I feel sure she knows they have souls.” + +“I wonder,” Mr. Darling said thoughtfully, “I wonder.” It was an +opportunity, his wife felt, for telling him about the boy. At first he +pooh-poohed the story, but he became thoughtful when she showed him the +shadow. + +“It is nobody I know,” he said, examining it carefully, “but it does +look a scoundrel.” + +“We were still discussing it, you remember,” says Mr. Darling, “when +Nana came in with Michael's medicine. You will never carry the bottle in +your mouth again, Nana, and it is all my fault.” + +Strong man though he was, there is no doubt that he had behaved rather +foolishly over the medicine. If he had a weakness, it was for thinking +that all his life he had taken medicine boldly, and so now, when Michael +dodged the spoon in Nana's mouth, he had said reprovingly, “Be a man, +Michael.” + +“Won't; won't!” Michael cried naughtily. Mrs. Darling left the room to +get a chocolate for him, and Mr. Darling thought this showed want of +firmness. + +“Mother, don't pamper him,” he called after her. “Michael, when I was +your age I took medicine without a murmur. I said, 'Thank you, kind +parents, for giving me bottles to make me well.'” + +He really thought this was true, and Wendy, who was now in her +night-gown, believed it also, and she said, to encourage Michael, “That +medicine you sometimes take, father, is much nastier, isn't it?” + +“Ever so much nastier,” Mr. Darling said bravely, “and I would take it +now as an example to you, Michael, if I hadn't lost the bottle.” + +He had not exactly lost it; he had climbed in the dead of night to the +top of the wardrobe and hidden it there. What he did not know was that +the faithful Liza had found it, and put it back on his wash-stand. + +“I know where it is, father,” Wendy cried, always glad to be of service. +“I'll bring it,” and she was off before he could stop her. Immediately +his spirits sank in the strangest way. + +“John,” he said, shuddering, “it's most beastly stuff. It's that nasty, +sticky, sweet kind.” + +“It will soon be over, father,” John said cheerily, and then in rushed +Wendy with the medicine in a glass. + +“I have been as quick as I could,” she panted. + +“You have been wonderfully quick,” her father retorted, with a +vindictive politeness that was quite thrown away upon her. “Michael +first,” he said doggedly. + +“Father first,” said Michael, who was of a suspicious nature. + +“I shall be sick, you know,” Mr. Darling said threateningly. + +“Come on, father,” said John. + +“Hold your tongue, John,” his father rapped out. + +Wendy was quite puzzled. “I thought you took it quite easily, father.” + +“That is not the point,” he retorted. “The point is, that there is +more in my glass than in Michael's spoon.” His proud heart was nearly +bursting. “And it isn't fair: I would say it though it were with my last +breath; it isn't fair.” + +“Father, I am waiting,” said Michael coldly. + +“It's all very well to say you are waiting; so am I waiting.” + +“Father's a cowardly custard.” + +“So are you a cowardly custard.” + +“I'm not frightened.” + +“Neither am I frightened.” + +“Well, then, take it.” + +“Well, then, you take it.” + +Wendy had a splendid idea. “Why not both take it at the same time?” + +“Certainly,” said Mr. Darling. “Are you ready, Michael?” + +Wendy gave the words, one, two, three, and Michael took his medicine, +but Mr. Darling slipped his behind his back. + +There was a yell of rage from Michael, and “O father!” Wendy exclaimed. + +“What do you mean by 'O father'?” Mr. Darling demanded. “Stop that row, +Michael. I meant to take mine, but I--I missed it.” + +It was dreadful the way all the three were looking at him, just as if +they did not admire him. “Look here, all of you,” he said entreatingly, +as soon as Nana had gone into the bathroom. “I have just thought of a +splendid joke. I shall pour my medicine into Nana's bowl, and she will +drink it, thinking it is milk!” + +It was the colour of milk; but the children did not have their father's +sense of humour, and they looked at him reproachfully as he poured the +medicine into Nana's bowl. “What fun!” he said doubtfully, and they did +not dare expose him when Mrs. Darling and Nana returned. + +“Nana, good dog,” he said, patting her, “I have put a little milk into +your bowl, Nana.” + +Nana wagged her tail, ran to the medicine, and began lapping it. Then +she gave Mr. Darling such a look, not an angry look: she showed him the +great red tear that makes us so sorry for noble dogs, and crept into her +kennel. + +Mr. Darling was frightfully ashamed of himself, but he would not give +in. In a horrid silence Mrs. Darling smelt the bowl. “O George,” she +said, “it's your medicine!” + +“It was only a joke,” he roared, while she comforted her boys, and Wendy +hugged Nana. “Much good,” he said bitterly, “my wearing myself to the +bone trying to be funny in this house.” + +And still Wendy hugged Nana. “That's right,” he shouted. “Coddle her! +Nobody coddles me. Oh dear no! I am only the breadwinner, why should I +be coddled--why, why, why!” + +“George,” Mrs. Darling entreated him, “not so loud; the servants +will hear you.” Somehow they had got into the way of calling Liza the +servants. + +“Let them!” he answered recklessly. “Bring in the whole world. But I +refuse to allow that dog to lord it in my nursery for an hour longer.” + +The children wept, and Nana ran to him beseechingly, but he waved her +back. He felt he was a strong man again. “In vain, in vain,” he cried; +“the proper place for you is the yard, and there you go to be tied up +this instant.” + +“George, George,” Mrs. Darling whispered, “remember what I told you +about that boy.” + +Alas, he would not listen. He was determined to show who was master in +that house, and when commands would not draw Nana from the kennel, he +lured her out of it with honeyed words, and seizing her roughly, dragged +her from the nursery. He was ashamed of himself, and yet he did it. +It was all owing to his too affectionate nature, which craved for +admiration. When he had tied her up in the back-yard, the wretched +father went and sat in the passage, with his knuckles to his eyes. + +In the meantime Mrs. Darling had put the children to bed in unwonted +silence and lit their night-lights. They could hear Nana barking, and +John whimpered, “It is because he is chaining her up in the yard,” but +Wendy was wiser. + +“That is not Nana's unhappy bark,” she said, little guessing what was +about to happen; “that is her bark when she smells danger.” + +Danger! + +“Are you sure, Wendy?” + +“Oh, yes.” + +Mrs. Darling quivered and went to the window. It was securely fastened. +She looked out, and the night was peppered with stars. They were +crowding round the house, as if curious to see what was to take place +there, but she did not notice this, nor that one or two of the smaller +ones winked at her. Yet a nameless fear clutched at her heart and made +her cry, “Oh, how I wish that I wasn't going to a party to-night!” + +Even Michael, already half asleep, knew that she was perturbed, and he +asked, “Can anything harm us, mother, after the night-lights are lit?” + +“Nothing, precious,” she said; “they are the eyes a mother leaves behind +her to guard her children.” + +She went from bed to bed singing enchantments over them, and little +Michael flung his arms round her. “Mother,” he cried, “I'm glad of you.” + They were the last words she was to hear from him for a long time. + +No. 27 was only a few yards distant, but there had been a slight fall of +snow, and Father and Mother Darling picked their way over it deftly not +to soil their shoes. They were already the only persons in the street, +and all the stars were watching them. Stars are beautiful, but they may +not take an active part in anything, they must just look on for ever. It +is a punishment put on them for something they did so long ago that no +star now knows what it was. So the older ones have become glassy-eyed +and seldom speak (winking is the star language), but the little +ones still wonder. They are not really friendly to Peter, who had a +mischievous way of stealing up behind them and trying to blow them out; +but they are so fond of fun that they were on his side to-night, and +anxious to get the grown-ups out of the way. So as soon as the door +of 27 closed on Mr. and Mrs. Darling there was a commotion in the +firmament, and the smallest of all the stars in the Milky Way screamed +out: + +“Now, Peter!” + + + + +Chapter 3 COME AWAY, COME AWAY! + +For a moment after Mr. and Mrs. Darling left the house the night-lights +by the beds of the three children continued to burn clearly. They were +awfully nice little night-lights, and one cannot help wishing that they +could have kept awake to see Peter; but Wendy's light blinked and gave +such a yawn that the other two yawned also, and before they could close +their mouths all the three went out. + +There was another light in the room now, a thousand times brighter than +the night-lights, and in the time we have taken to say this, it had been +in all the drawers in the nursery, looking for Peter's shadow, rummaged +the wardrobe and turned every pocket inside out. It was not really a +light; it made this light by flashing about so quickly, but when it came +to rest for a second you saw it was a fairy, no longer than your hand, +but still growing. It was a girl called Tinker Bell exquisitely gowned +in a skeleton leaf, cut low and square, through which her figure could +be seen to the best advantage. She was slightly inclined to EMBONPOINT. +[plump hourglass figure] + +A moment after the fairy's entrance the window was blown open by the +breathing of the little stars, and Peter dropped in. He had carried +Tinker Bell part of the way, and his hand was still messy with the fairy +dust. + +“Tinker Bell,” he called softly, after making sure that the children +were asleep, “Tink, where are you?” She was in a jug for the moment, and +liking it extremely; she had never been in a jug before. + +“Oh, do come out of that jug, and tell me, do you know where they put my +shadow?” + +The loveliest tinkle as of golden bells answered him. It is the fairy +language. You ordinary children can never hear it, but if you were to +hear it you would know that you had heard it once before. + +Tink said that the shadow was in the big box. She meant the chest of +drawers, and Peter jumped at the drawers, scattering their contents to +the floor with both hands, as kings toss ha'pence to the crowd. In a +moment he had recovered his shadow, and in his delight he forgot that he +had shut Tinker Bell up in the drawer. + +If he thought at all, but I don't believe he ever thought, it was that +he and his shadow, when brought near each other, would join like drops +of water, and when they did not he was appalled. He tried to stick it +on with soap from the bathroom, but that also failed. A shudder passed +through Peter, and he sat on the floor and cried. + +His sobs woke Wendy, and she sat up in bed. She was not alarmed to see +a stranger crying on the nursery floor; she was only pleasantly +interested. + +“Boy,” she said courteously, “why are you crying?” + +Peter could be exceeding polite also, having learned the grand manner at +fairy ceremonies, and he rose and bowed to her beautifully. She was much +pleased, and bowed beautifully to him from the bed. + +“What's your name?” he asked. + +“Wendy Moira Angela Darling,” she replied with some satisfaction. “What +is your name?” + +“Peter Pan.” + +She was already sure that he must be Peter, but it did seem a +comparatively short name. + +“Is that all?” + +“Yes,” he said rather sharply. He felt for the first time that it was a +shortish name. + +“I'm so sorry,” said Wendy Moira Angela. + +“It doesn't matter,” Peter gulped. + +She asked where he lived. + +“Second to the right,” said Peter, “and then straight on till morning.” + +“What a funny address!” + +Peter had a sinking. For the first time he felt that perhaps it was a +funny address. + +“No, it isn't,” he said. + +“I mean,” Wendy said nicely, remembering that she was hostess, “is that +what they put on the letters?” + +He wished she had not mentioned letters. + +“Don't get any letters,” he said contemptuously. + +“But your mother gets letters?” + +“Don't have a mother,” he said. Not only had he no mother, but he had +not the slightest desire to have one. He thought them very over-rated +persons. Wendy, however, felt at once that she was in the presence of a +tragedy. + +“O Peter, no wonder you were crying,” she said, and got out of bed and +ran to him. + +“I wasn't crying about mothers,” he said rather indignantly. “I was +crying because I can't get my shadow to stick on. Besides, I wasn't +crying.” + +“It has come off?” + +“Yes.” + +Then Wendy saw the shadow on the floor, looking so draggled, and she was +frightfully sorry for Peter. “How awful!” she said, but she could not +help smiling when she saw that he had been trying to stick it on with +soap. How exactly like a boy! + +Fortunately she knew at once what to do. “It must be sewn on,” she said, +just a little patronisingly. + +“What's sewn?” he asked. + +“You're dreadfully ignorant.” + +“No, I'm not.” + +But she was exulting in his ignorance. “I shall sew it on for you, my +little man,” she said, though he was tall as herself, and she got out +her housewife [sewing bag], and sewed the shadow on to Peter's foot. + +“I daresay it will hurt a little,” she warned him. + +“Oh, I shan't cry,” said Peter, who was already of the opinion that he +had never cried in his life. And he clenched his teeth and did not +cry, and soon his shadow was behaving properly, though still a little +creased. + +“Perhaps I should have ironed it,” Wendy said thoughtfully, but Peter, +boylike, was indifferent to appearances, and he was now jumping about in +the wildest glee. Alas, he had already forgotten that he owed his bliss +to Wendy. He thought he had attached the shadow himself. “How clever I +am!” he crowed rapturously, “oh, the cleverness of me!” + +It is humiliating to have to confess that this conceit of Peter was +one of his most fascinating qualities. To put it with brutal frankness, +there never was a cockier boy. + +But for the moment Wendy was shocked. “You conceit [braggart],” she +exclaimed, with frightful sarcasm; “of course I did nothing!” + +“You did a little,” Peter said carelessly, and continued to dance. + +“A little!” she replied with hauteur [pride]; “if I am no use I can at +least withdraw,” and she sprang in the most dignified way into bed and +covered her face with the blankets. + +To induce her to look up he pretended to be going away, and when this +failed he sat on the end of the bed and tapped her gently with his foot. +“Wendy,” he said, “don't withdraw. I can't help crowing, Wendy, when +I'm pleased with myself.” Still she would not look up, though she was +listening eagerly. “Wendy,” he continued, in a voice that no woman has +ever yet been able to resist, “Wendy, one girl is more use than twenty +boys.” + +Now Wendy was every inch a woman, though there were not very many +inches, and she peeped out of the bed-clothes. + +“Do you really think so, Peter?” + +“Yes, I do.” + +“I think it's perfectly sweet of you,” she declared, “and I'll get up +again,” and she sat with him on the side of the bed. She also said +she would give him a kiss if he liked, but Peter did not know what she +meant, and he held out his hand expectantly. + +“Surely you know what a kiss is?” she asked, aghast. + +“I shall know when you give it to me,” he replied stiffly, and not to +hurt his feeling she gave him a thimble. + +“Now,” said he, “shall I give you a kiss?” and she replied with a slight +primness, “If you please.” She made herself rather cheap by inclining +her face toward him, but he merely dropped an acorn button into her +hand, so she slowly returned her face to where it had been before, and +said nicely that she would wear his kiss on the chain around her neck. +It was lucky that she did put it on that chain, for it was afterwards to +save her life. + +When people in our set are introduced, it is customary for them to +ask each other's age, and so Wendy, who always liked to do the correct +thing, asked Peter how old he was. It was not really a happy question to +ask him; it was like an examination paper that asks grammar, when what +you want to be asked is Kings of England. + +“I don't know,” he replied uneasily, “but I am quite young.” He really +knew nothing about it, he had merely suspicions, but he said at a +venture, “Wendy, I ran away the day I was born.” + +Wendy was quite surprised, but interested; and she indicated in the +charming drawing-room manner, by a touch on her night-gown, that he +could sit nearer her. + +“It was because I heard father and mother,” he explained in a low +voice, “talking about what I was to be when I became a man.” He was +extraordinarily agitated now. “I don't want ever to be a man,” he said +with passion. “I want always to be a little boy and to have fun. So +I ran away to Kensington Gardens and lived a long long time among the +fairies.” + +She gave him a look of the most intense admiration, and he thought it +was because he had run away, but it was really because he knew fairies. +Wendy had lived such a home life that to know fairies struck her as +quite delightful. She poured out questions about them, to his surprise, +for they were rather a nuisance to him, getting in his way and so on, +and indeed he sometimes had to give them a hiding [spanking]. Still, he +liked them on the whole, and he told her about the beginning of fairies. + +“You see, Wendy, when the first baby laughed for the first time, its +laugh broke into a thousand pieces, and they all went skipping about, +and that was the beginning of fairies.” + +Tedious talk this, but being a stay-at-home she liked it. + +“And so,” he went on good-naturedly, “there ought to be one fairy for +every boy and girl.” + +“Ought to be? Isn't there?” + +“No. You see children know such a lot now, they soon don't believe in +fairies, and every time a child says, 'I don't believe in fairies,' +there is a fairy somewhere that falls down dead.” + +Really, he thought they had now talked enough about fairies, and it +struck him that Tinker Bell was keeping very quiet. “I can't think where +she has gone to,” he said, rising, and he called Tink by name. Wendy's +heart went flutter with a sudden thrill. + +“Peter,” she cried, clutching him, “you don't mean to tell me that there +is a fairy in this room!” + +“She was here just now,” he said a little impatiently. “You don't hear +her, do you?” and they both listened. + +“The only sound I hear,” said Wendy, “is like a tinkle of bells.” + +“Well, that's Tink, that's the fairy language. I think I hear her too.” + +The sound came from the chest of drawers, and Peter made a merry face. +No one could ever look quite so merry as Peter, and the loveliest of +gurgles was his laugh. He had his first laugh still. + +“Wendy,” he whispered gleefully, “I do believe I shut her up in the +drawer!” + +He let poor Tink out of the drawer, and she flew about the nursery +screaming with fury. “You shouldn't say such things,” Peter retorted. +“Of course I'm very sorry, but how could I know you were in the drawer?” + +Wendy was not listening to him. “O Peter,” she cried, “if she would only +stand still and let me see her!” + +“They hardly ever stand still,” he said, but for one moment Wendy saw +the romantic figure come to rest on the cuckoo clock. “O the lovely!” + she cried, though Tink's face was still distorted with passion. + +“Tink,” said Peter amiably, “this lady says she wishes you were her +fairy.” + +Tinker Bell answered insolently. + +“What does she say, Peter?” + +He had to translate. “She is not very polite. She says you are a great +[huge] ugly girl, and that she is my fairy.” + +He tried to argue with Tink. “You know you can't be my fairy, Tink, +because I am an gentleman and you are a lady.” + +To this Tink replied in these words, “You silly ass,” and disappeared +into the bathroom. “She is quite a common fairy,” Peter explained +apologetically, “she is called Tinker Bell because she mends the pots +and kettles [tinker = tin worker].” [Similar to “cinder” plus “elle” to +get Cinderella] + +They were together in the armchair by this time, and Wendy plied him +with more questions. + +“If you don't live in Kensington Gardens now--” + +“Sometimes I do still.” + +“But where do you live mostly now?” + +“With the lost boys.” + +“Who are they?” + +“They are the children who fall out of their perambulators when the +nurse is looking the other way. If they are not claimed in seven +days they are sent far away to the Neverland to defray expenses. I'm +captain.” + +“What fun it must be!” + +“Yes,” said cunning Peter, “but we are rather lonely. You see we have no +female companionship.” + +“Are none of the others girls?” + +“Oh, no; girls, you know, are much too clever to fall out of their +prams.” + +This flattered Wendy immensely. “I think,” she said, “it is perfectly +lovely the way you talk about girls; John there just despises us.” + +For reply Peter rose and kicked John out of bed, blankets and all; one +kick. This seemed to Wendy rather forward for a first meeting, and she +told him with spirit that he was not captain in her house. However, +John continued to sleep so placidly on the floor that she allowed him +to remain there. “And I know you meant to be kind,” she said, relenting, +“so you may give me a kiss.” + +For the moment she had forgotten his ignorance about kisses. “I thought +you would want it back,” he said a little bitterly, and offered to +return her the thimble. + +“Oh dear,” said the nice Wendy, “I don't mean a kiss, I mean a thimble.” + +“What's that?” + +“It's like this.” She kissed him. + +“Funny!” said Peter gravely. “Now shall I give you a thimble?” + +“If you wish to,” said Wendy, keeping her head erect this time. + +Peter thimbled her, and almost immediately she screeched. “What is it, +Wendy?” + +“It was exactly as if someone were pulling my hair.” + +“That must have been Tink. I never knew her so naughty before.” + +And indeed Tink was darting about again, using offensive language. + +“She says she will do that to you, Wendy, every time I give you a +thimble.” + +“But why?” + +“Why, Tink?” + +Again Tink replied, “You silly ass.” Peter could not understand why, +but Wendy understood, and she was just slightly disappointed when he +admitted that he came to the nursery window not to see her but to listen +to stories. + +“You see, I don't know any stories. None of the lost boys knows any +stories.” + +“How perfectly awful,” Wendy said. + +“Do you know,” Peter asked “why swallows build in the eaves of houses? +It is to listen to the stories. O Wendy, your mother was telling you +such a lovely story.” + +“Which story was it?” + +“About the prince who couldn't find the lady who wore the glass +slipper.” + +“Peter,” said Wendy excitedly, “that was Cinderella, and he found her, +and they lived happily ever after.” + +Peter was so glad that he rose from the floor, where they had been +sitting, and hurried to the window. + +“Where are you going?” she cried with misgiving. + +“To tell the other boys.” + +“Don't go Peter,” she entreated, “I know such lots of stories.” + +Those were her precise words, so there can be no denying that it was she +who first tempted him. + +He came back, and there was a greedy look in his eyes now which ought to +have alarmed her, but did not. + +“Oh, the stories I could tell to the boys!” she cried, and then Peter +gripped her and began to draw her toward the window. + +“Let me go!” she ordered him. + +“Wendy, do come with me and tell the other boys.” + +Of course she was very pleased to be asked, but she said, “Oh dear, I +can't. Think of mummy! Besides, I can't fly.” + +“I'll teach you.” + +“Oh, how lovely to fly.” + +“I'll teach you how to jump on the wind's back, and then away we go.” + +“Oo!” she exclaimed rapturously. + +“Wendy, Wendy, when you are sleeping in your silly bed you might be +flying about with me saying funny things to the stars.” + +“Oo!” + +“And, Wendy, there are mermaids.” + +“Mermaids! With tails?” + +“Such long tails.” + +“Oh,” cried Wendy, “to see a mermaid!” + +He had become frightfully cunning. “Wendy,” he said, “how we should all +respect you.” + +She was wriggling her body in distress. It was quite as if she were +trying to remain on the nursery floor. + +But he had no pity for her. + +“Wendy,” he said, the sly one, “you could tuck us in at night.” + +“Oo!” + +“None of us has ever been tucked in at night.” + +“Oo,” and her arms went out to him. + +“And you could darn our clothes, and make pockets for us. None of us has +any pockets.” + +How could she resist. “Of course it's awfully fascinating!” she cried. +“Peter, would you teach John and Michael to fly too?” + +“If you like,” he said indifferently, and she ran to John and Michael +and shook them. “Wake up,” she cried, “Peter Pan has come and he is to +teach us to fly.” + +John rubbed his eyes. “Then I shall get up,” he said. Of course he was +on the floor already. “Hallo,” he said, “I am up!” + +Michael was up by this time also, looking as sharp as a knife with six +blades and a saw, but Peter suddenly signed silence. Their faces assumed +the awful craftiness of children listening for sounds from the grown-up +world. All was as still as salt. Then everything was right. No, stop! +Everything was wrong. Nana, who had been barking distressfully all the +evening, was quiet now. It was her silence they had heard. + +“Out with the light! Hide! Quick!” cried John, taking command for the +only time throughout the whole adventure. And thus when Liza entered, +holding Nana, the nursery seemed quite its old self, very dark, and +you would have sworn you heard its three wicked inmates breathing +angelically as they slept. They were really doing it artfully from +behind the window curtains. + +Liza was in a bad temper, for she was mixing the Christmas puddings in +the kitchen, and had been drawn from them, with a raisin still on her +cheek, by Nana's absurd suspicions. She thought the best way of getting +a little quiet was to take Nana to the nursery for a moment, but in +custody of course. + +“There, you suspicious brute,” she said, not sorry that Nana was in +disgrace. “They are perfectly safe, aren't they? Every one of the little +angels sound asleep in bed. Listen to their gentle breathing.” + +Here Michael, encouraged by his success, breathed so loudly that they +were nearly detected. Nana knew that kind of breathing, and she tried to +drag herself out of Liza's clutches. + +But Liza was dense. “No more of it, Nana,” she said sternly, pulling +her out of the room. “I warn you if you bark again I shall go straight +for master and missus and bring them home from the party, and then, oh, +won't master whip you, just.” + +She tied the unhappy dog up again, but do you think Nana ceased to bark? +Bring master and missus home from the party! Why, that was just what she +wanted. Do you think she cared whether she was whipped so long as her +charges were safe? Unfortunately Liza returned to her puddings, and +Nana, seeing that no help would come from her, strained and strained at +the chain until at last she broke it. In another moment she had burst +into the dining-room of 27 and flung up her paws to heaven, her most +expressive way of making a communication. Mr. and Mrs. Darling knew at +once that something terrible was happening in their nursery, and without +a good-bye to their hostess they rushed into the street. + +But it was now ten minutes since three scoundrels had been breathing +behind the curtains, and Peter Pan can do a great deal in ten minutes. + +We now return to the nursery. + +“It's all right,” John announced, emerging from his hiding-place. “I +say, Peter, can you really fly?” + +Instead of troubling to answer him Peter flew around the room, taking +the mantelpiece on the way. + +“How topping!” said John and Michael. + +“How sweet!” cried Wendy. + +“Yes, I'm sweet, oh, I am sweet!” said Peter, forgetting his manners +again. + +It looked delightfully easy, and they tried it first from the floor and +then from the beds, but they always went down instead of up. + +“I say, how do you do it?” asked John, rubbing his knee. He was quite a +practical boy. + +“You just think lovely wonderful thoughts,” Peter explained, “and they +lift you up in the air.” + +He showed them again. + +“You're so nippy at it,” John said, “couldn't you do it very slowly +once?” + +Peter did it both slowly and quickly. “I've got it now, Wendy!” cried +John, but soon he found he had not. Not one of them could fly an inch, +though even Michael was in words of two syllables, and Peter did not +know A from Z. + +Of course Peter had been trifling with them, for no one can fly unless +the fairy dust has been blown on him. Fortunately, as we have mentioned, +one of his hands was messy with it, and he blew some on each of them, +with the most superb results. + +“Now just wiggle your shoulders this way,” he said, “and let go.” + +They were all on their beds, and gallant Michael let go first. He did +not quite mean to let go, but he did it, and immediately he was borne +across the room. + +“I flewed!” he screamed while still in mid-air. + +John let go and met Wendy near the bathroom. + +“Oh, lovely!” + +“Oh, ripping!” + +“Look at me!” + +“Look at me!” + +“Look at me!” + +They were not nearly so elegant as Peter, they could not help kicking a +little, but their heads were bobbing against the ceiling, and there is +almost nothing so delicious as that. Peter gave Wendy a hand at first, +but had to desist, Tink was so indignant. + +Up and down they went, and round and round. Heavenly was Wendy's word. + +“I say,” cried John, “why shouldn't we all go out?” + +Of course it was to this that Peter had been luring them. + +Michael was ready: he wanted to see how long it took him to do a billion +miles. But Wendy hesitated. + +“Mermaids!” said Peter again. + +“Oo!” + +“And there are pirates.” + +“Pirates,” cried John, seizing his Sunday hat, “let us go at once.” + +It was just at this moment that Mr. and Mrs. Darling hurried with Nana +out of 27. They ran into the middle of the street to look up at the +nursery window; and, yes, it was still shut, but the room was ablaze +with light, and most heart-gripping sight of all, they could see in +shadow on the curtain three little figures in night attire circling +round and round, not on the floor but in the air. + +Not three figures, four! + +In a tremble they opened the street door. Mr. Darling would have rushed +upstairs, but Mrs. Darling signed him to go softly. She even tried to +make her heart go softly. + +Will they reach the nursery in time? If so, how delightful for them, and +we shall all breathe a sigh of relief, but there will be no story. On +the other hand, if they are not in time, I solemnly promise that it will +all come right in the end. + +They would have reached the nursery in time had it not been that the +little stars were watching them. Once again the stars blew the window +open, and that smallest star of all called out: + +“Cave, Peter!” + +Then Peter knew that there was not a moment to lose. “Come,” he cried +imperiously, and soared out at once into the night, followed by John and +Michael and Wendy. + +Mr. and Mrs. Darling and Nana rushed into the nursery too late. The +birds were flown. + + + + +Chapter 4 THE FLIGHT + +“Second to the right, and straight on till morning.” + +That, Peter had told Wendy, was the way to the Neverland; but even +birds, carrying maps and consulting them at windy corners, could not +have sighted it with these instructions. Peter, you see, just said +anything that came into his head. + +At first his companions trusted him implicitly, and so great were the +delights of flying that they wasted time circling round church spires or +any other tall objects on the way that took their fancy. + +John and Michael raced, Michael getting a start. + +They recalled with contempt that not so long ago they had thought +themselves fine fellows for being able to fly round a room. + +Not long ago. But how long ago? They were flying over the sea before +this thought began to disturb Wendy seriously. John thought it was their +second sea and their third night. + +Sometimes it was dark and sometimes light, and now they were very cold +and again too warm. Did they really feel hungry at times, or were they +merely pretending, because Peter had such a jolly new way of feeding +them? His way was to pursue birds who had food in their mouths suitable +for humans and snatch it from them; then the birds would follow and +snatch it back; and they would all go chasing each other gaily for +miles, parting at last with mutual expressions of good-will. But Wendy +noticed with gentle concern that Peter did not seem to know that this +was rather an odd way of getting your bread and butter, nor even that +there are other ways. + +Certainly they did not pretend to be sleepy, they were sleepy; and that +was a danger, for the moment they popped off, down they fell. The awful +thing was that Peter thought this funny. + +“There he goes again!” he would cry gleefully, as Michael suddenly +dropped like a stone. + +“Save him, save him!” cried Wendy, looking with horror at the cruel +sea far below. Eventually Peter would dive through the air, and catch +Michael just before he could strike the sea, and it was lovely the way +he did it; but he always waited till the last moment, and you felt it +was his cleverness that interested him and not the saving of human life. +Also he was fond of variety, and the sport that engrossed him one moment +would suddenly cease to engage him, so there was always the possibility +that the next time you fell he would let you go. + +He could sleep in the air without falling, by merely lying on his back +and floating, but this was, partly at least, because he was so light +that if you got behind him and blew he went faster. + +“Do be more polite to him,” Wendy whispered to John, when they were +playing “Follow my Leader.” + +“Then tell him to stop showing off,” said John. + +When playing Follow my Leader, Peter would fly close to the water and +touch each shark's tail in passing, just as in the street you may run +your finger along an iron railing. They could not follow him in this +with much success, so perhaps it was rather like showing off, especially +as he kept looking behind to see how many tails they missed. + +“You must be nice to him,” Wendy impressed on her brothers. “What could +we do if he were to leave us!” + +“We could go back,” Michael said. + +“How could we ever find our way back without him?” + +“Well, then, we could go on,” said John. + +“That is the awful thing, John. We should have to go on, for we don't +know how to stop.” + +This was true, Peter had forgotten to show them how to stop. + +John said that if the worst came to the worst, all they had to do was to +go straight on, for the world was round, and so in time they must come +back to their own window. + +“And who is to get food for us, John?” + +“I nipped a bit out of that eagle's mouth pretty neatly, Wendy.” + +“After the twentieth try,” Wendy reminded him. “And even though we +became good at picking up food, see how we bump against clouds and things +if he is not near to give us a hand.” + +Indeed they were constantly bumping. They could now fly strongly, though +they still kicked far too much; but if they saw a cloud in front of +them, the more they tried to avoid it, the more certainly did they bump +into it. If Nana had been with them, she would have had a bandage round +Michael's forehead by this time. + +Peter was not with them for the moment, and they felt rather lonely up +there by themselves. He could go so much faster than they that he would +suddenly shoot out of sight, to have some adventure in which they had no +share. He would come down laughing over something fearfully funny he had +been saying to a star, but he had already forgotten what it was, or he +would come up with mermaid scales still sticking to him, and yet not be +able to say for certain what had been happening. It was really rather +irritating to children who had never seen a mermaid. + +“And if he forgets them so quickly,” Wendy argued, “how can we expect +that he will go on remembering us?” + +Indeed, sometimes when he returned he did not remember them, at least +not well. Wendy was sure of it. She saw recognition come into his eyes +as he was about to pass them the time of day and go on; once even she +had to call him by name. + +“I'm Wendy,” she said agitatedly. + +He was very sorry. “I say, Wendy,” he whispered to her, “always if you +see me forgetting you, just keep on saying 'I'm Wendy,' and then I'll +remember.” + +Of course this was rather unsatisfactory. However, to make amends he +showed them how to lie out flat on a strong wind that was going their +way, and this was such a pleasant change that they tried it several +times and found that they could sleep thus with security. Indeed they +would have slept longer, but Peter tired quickly of sleeping, and soon +he would cry in his captain voice, “We get off here.” So with occasional +tiffs, but on the whole rollicking, they drew near the Neverland; for +after many moons they did reach it, and, what is more, they had been +going pretty straight all the time, not perhaps so much owing to the +guidance of Peter or Tink as because the island was looking for them. It +is only thus that any one may sight those magic shores. + +“There it is,” said Peter calmly. + +“Where, where?” + +“Where all the arrows are pointing.” + +Indeed a million golden arrows were pointing it out to the children, all +directed by their friend the sun, who wanted them to be sure of their +way before leaving them for the night. + +Wendy and John and Michael stood on tip-toe in the air to get their +first sight of the island. Strange to say, they all recognized it at +once, and until fear fell upon them they hailed it, not as something +long dreamt of and seen at last, but as a familiar friend to whom they +were returning home for the holidays. + +“John, there's the lagoon.” + +“Wendy, look at the turtles burying their eggs in the sand.” + +“I say, John, I see your flamingo with the broken leg!” + +“Look, Michael, there's your cave!” + +“John, what's that in the brushwood?” + +“It's a wolf with her whelps. Wendy, I do believe that's your little +whelp!” + +“There's my boat, John, with her sides stove in!” + +“No, it isn't. Why, we burned your boat.” + +“That's her, at any rate. I say, John, I see the smoke of the redskin +camp!” + +“Where? Show me, and I'll tell you by the way smoke curls whether they +are on the war-path.” + +“There, just across the Mysterious River.” + +“I see now. Yes, they are on the war-path right enough.” + +Peter was a little annoyed with them for knowing so much, but if he +wanted to lord it over them his triumph was at hand, for have I not told +you that anon fear fell upon them? + +It came as the arrows went, leaving the island in gloom. + +In the old days at home the Neverland had always begun to look a little +dark and threatening by bedtime. Then unexplored patches arose in it +and spread, black shadows moved about in them, the roar of the beasts of +prey was quite different now, and above all, you lost the certainty that +you would win. You were quite glad that the night-lights were on. You +even liked Nana to say that this was just the mantelpiece over here, and +that the Neverland was all make-believe. + +Of course the Neverland had been make-believe in those days, but it +was real now, and there were no night-lights, and it was getting darker +every moment, and where was Nana? + +They had been flying apart, but they huddled close to Peter now. His +careless manner had gone at last, his eyes were sparkling, and a tingle +went through them every time they touched his body. They were now over +the fearsome island, flying so low that sometimes a tree grazed their +feet. Nothing horrid was visible in the air, yet their progress had +become slow and laboured, exactly as if they were pushing their way +through hostile forces. Sometimes they hung in the air until Peter had +beaten on it with his fists. + +“They don't want us to land,” he explained. + +“Who are they?” Wendy whispered, shuddering. + +But he could not or would not say. Tinker Bell had been asleep on his +shoulder, but now he wakened her and sent her on in front. + +Sometimes he poised himself in the air, listening intently, with his +hand to his ear, and again he would stare down with eyes so bright that +they seemed to bore two holes to earth. Having done these things, he +went on again. + +His courage was almost appalling. “Would you like an adventure now,” he +said casually to John, “or would you like to have your tea first?” + +Wendy said “tea first” quickly, and Michael pressed her hand in +gratitude, but the braver John hesitated. + +“What kind of adventure?” he asked cautiously. + +“There's a pirate asleep in the pampas just beneath us,” Peter told him. +“If you like, we'll go down and kill him.” + +“I don't see him,” John said after a long pause. + +“I do.” + +“Suppose,” John said, a little huskily, “he were to wake up.” + +Peter spoke indignantly. “You don't think I would kill him while he was +sleeping! I would wake him first, and then kill him. That's the way I +always do.” + +“I say! Do you kill many?” + +“Tons.” + +John said “How ripping,” but decided to have tea first. He asked if +there were many pirates on the island just now, and Peter said he had +never known so many. + +“Who is captain now?” + +“Hook,” answered Peter, and his face became very stern as he said that +hated word. + +“Jas. Hook?” + +“Ay.” + +Then indeed Michael began to cry, and even John could speak in gulps +only, for they knew Hook's reputation. + +“He was Blackbeard's bo'sun,” John whispered huskily. “He is the worst +of them all. He is the only man of whom Barbecue was afraid.” + +“That's him,” said Peter. + +“What is he like? Is he big?” + +“He is not so big as he was.” + +“How do you mean?” + +“I cut off a bit of him.” + +“You!” + +“Yes, me,” said Peter sharply. + +“I wasn't meaning to be disrespectful.” + +“Oh, all right.” + +“But, I say, what bit?” + +“His right hand.” + +“Then he can't fight now?” + +“Oh, can't he just!” + +“Left-hander?” + +“He has an iron hook instead of a right hand, and he claws with it.” + +“Claws!” + +“I say, John,” said Peter. + +“Yes.” + +“Say, 'Ay, ay, sir.'” + +“Ay, ay, sir.” + +“There is one thing,” Peter continued, “that every boy who serves under +me has to promise, and so must you.” + +John paled. + +“It is this, if we meet Hook in open fight, you must leave him to me.” + +“I promise,” John said loyally. + +For the moment they were feeling less eerie, because Tink was flying +with them, and in her light they could distinguish each other. +Unfortunately she could not fly so slowly as they, and so she had to go +round and round them in a circle in which they moved as in a halo. Wendy +quite liked it, until Peter pointed out the drawbacks. + +“She tells me,” he said, “that the pirates sighted us before the +darkness came, and got Long Tom out.” + +“The big gun?” + +“Yes. And of course they must see her light, and if they guess we are +near it they are sure to let fly.” + +“Wendy!” + +“John!” + +“Michael!” + +“Tell her to go away at once, Peter,” the three cried simultaneously, +but he refused. + +“She thinks we have lost the way,” he replied stiffly, “and she is +rather frightened. You don't think I would send her away all by herself +when she is frightened!” + +For a moment the circle of light was broken, and something gave Peter a +loving little pinch. + +“Then tell her,” Wendy begged, “to put out her light.” + +“She can't put it out. That is about the only thing fairies can't do. It +just goes out of itself when she falls asleep, same as the stars.” + +“Then tell her to sleep at once,” John almost ordered. + +“She can't sleep except when she's sleepy. It is the only other thing +fairies can't do.” + +“Seems to me,” growled John, “these are the only two things worth +doing.” + +Here he got a pinch, but not a loving one. + +“If only one of us had a pocket,” Peter said, “we could carry her in +it.” However, they had set off in such a hurry that there was not a +pocket between the four of them. + +He had a happy idea. John's hat! + +Tink agreed to travel by hat if it was carried in the hand. John carried +it, though she had hoped to be carried by Peter. Presently Wendy took +the hat, because John said it struck against his knee as he flew; and +this, as we shall see, led to mischief, for Tinker Bell hated to be +under an obligation to Wendy. + +In the black topper the light was completely hidden, and they flew on in +silence. It was the stillest silence they had ever known, broken once by +a distant lapping, which Peter explained was the wild beasts drinking at +the ford, and again by a rasping sound that might have been the branches +of trees rubbing together, but he said it was the redskins sharpening +their knives. + +Even these noises ceased. To Michael the loneliness was dreadful. “If +only something would make a sound!” he cried. + +As if in answer to his request, the air was rent by the most tremendous +crash he had ever heard. The pirates had fired Long Tom at them. + +The roar of it echoed through the mountains, and the echoes seemed to +cry savagely, “Where are they, where are they, where are they?” + +Thus sharply did the terrified three learn the difference between an +island of make-believe and the same island come true. + +When at last the heavens were steady again, John and Michael +found themselves alone in the darkness. John was treading the air +mechanically, and Michael without knowing how to float was floating. + +“Are you shot?” John whispered tremulously. + +“I haven't tried [myself out] yet,” Michael whispered back. + +We know now that no one had been hit. Peter, however, had been carried +by the wind of the shot far out to sea, while Wendy was blown upwards +with no companion but Tinker Bell. + +It would have been well for Wendy if at that moment she had dropped the +hat. + +I don't know whether the idea came suddenly to Tink, or whether she had +planned it on the way, but she at once popped out of the hat and began +to lure Wendy to her destruction. + +Tink was not all bad; or, rather, she was all bad just now, but, on the +other hand, sometimes she was all good. Fairies have to be one thing or +the other, because being so small they unfortunately have room for one +feeling only at a time. They are, however, allowed to change, only it +must be a complete change. At present she was full of jealousy of Wendy. +What she said in her lovely tinkle Wendy could not of course understand, +and I believe some of it was bad words, but it sounded kind, and she +flew back and forward, plainly meaning “Follow me, and all will be +well.” + +What else could poor Wendy do? She called to Peter and John and Michael, +and got only mocking echoes in reply. She did not yet know that Tink +hated her with the fierce hatred of a very woman. And so, bewildered, +and now staggering in her flight, she followed Tink to her doom. + + + + +Chapter 5 THE ISLAND COME TRUE + +Feeling that Peter was on his way back, the Neverland had again woke +into life. We ought to use the pluperfect and say wakened, but woke is +better and was always used by Peter. + +In his absence things are usually quiet on the island. The fairies take +an hour longer in the morning, the beasts attend to their young, the +redskins feed heavily for six days and nights, and when pirates and +lost boys meet they merely bite their thumbs at each other. But with the +coming of Peter, who hates lethargy, they are under way again: if you +put your ear to the ground now, you would hear the whole island seething +with life. + +On this evening the chief forces of the island were disposed as follows. +The lost boys were out looking for Peter, the pirates were out looking +for the lost boys, the redskins were out looking for the pirates, and +the beasts were out looking for the redskins. They were going round and +round the island, but they did not meet because all were going at the +same rate. + +All wanted blood except the boys, who liked it as a rule, but to-night +were out to greet their captain. The boys on the island vary, of course, +in numbers, according as they get killed and so on; and when they seem +to be growing up, which is against the rules, Peter thins them out; but +at this time there were six of them, counting the twins as two. Let us +pretend to lie here among the sugar-cane and watch them as they steal by +in single file, each with his hand on his dagger. + +They are forbidden by Peter to look in the least like him, and they wear +the skins of the bears slain by themselves, in which they are so round +and furry that when they fall they roll. They have therefore become very +sure-footed. + +The first to pass is Tootles, not the least brave but the most +unfortunate of all that gallant band. He had been in fewer adventures +than any of them, because the big things constantly happened just when +he had stepped round the corner; all would be quiet, he would take the +opportunity of going off to gather a few sticks for firewood, and +then when he returned the others would be sweeping up the blood. This +ill-luck had given a gentle melancholy to his countenance, but instead +of souring his nature had sweetened it, so that he was quite the +humblest of the boys. Poor kind Tootles, there is danger in the air for +you to-night. Take care lest an adventure is now offered you, which, if +accepted, will plunge you in deepest woe. Tootles, the fairy Tink, who +is bent on mischief this night is looking for a tool [for doing her +mischief], and she thinks you are the most easily tricked of the boys. +'Ware Tinker Bell. + +Would that he could hear us, but we are not really on the island, and he +passes by, biting his knuckles. + +Next comes Nibs, the gay and debonair, followed by Slightly, who cuts +whistles out of the trees and dances ecstatically to his own tunes. +Slightly is the most conceited of the boys. He thinks he remembers the +days before he was lost, with their manners and customs, and this has +given his nose an offensive tilt. Curly is fourth; he is a pickle, [a +person who gets in pickles-predicaments] and so often has he had to +deliver up his person when Peter said sternly, “Stand forth the one who +did this thing,” that now at the command he stands forth automatically +whether he has done it or not. Last come the Twins, who cannot be +described because we should be sure to be describing the wrong one. +Peter never quite knew what twins were, and his band were not allowed +to know anything he did not know, so these two were always vague about +themselves, and did their best to give satisfaction by keeping close +together in an apologetic sort of way. + +The boys vanish in the gloom, and after a pause, but not a long pause, +for things go briskly on the island, come the pirates on their track. We +hear them before they are seen, and it is always the same dreadful song: + + “Avast belay, yo ho, heave to, + A-pirating we go, + And if we're parted by a shot + We're sure to meet below!” + +A more villainous-looking lot never hung in a row on Execution dock. +Here, a little in advance, ever and again with his head to the +ground listening, his great arms bare, pieces of eight in his ears as +ornaments, is the handsome Italian Cecco, who cut his name in letters +of blood on the back of the governor of the prison at Gao. That gigantic +black behind him has had many names since he dropped the one with +which dusky mothers still terrify their children on the banks of the +Guadjo-mo. Here is Bill Jukes, every inch of him tattooed, the same Bill +Jukes who got six dozen on the WALRUS from Flint before he would drop +the bag of moidores [Portuguese gold pieces]; and Cookson, said to +be Black Murphy's brother (but this was never proved), and Gentleman +Starkey, once an usher in a public school and still dainty in his ways +of killing; and Skylights (Morgan's Skylights); and the Irish bo'sun +Smee, an oddly genial man who stabbed, so to speak, without offence, +and was the only Non-conformist in Hook's crew; and Noodler, whose +hands were fixed on backwards; and Robt. Mullins and Alf Mason and many +another ruffian long known and feared on the Spanish Main. + +In the midst of them, the blackest and largest in that dark setting, +reclined James Hook, or as he wrote himself, Jas. Hook, of whom it is +said he was the only man that the Sea-Cook feared. He lay at his ease in +a rough chariot drawn and propelled by his men, and instead of a right +hand he had the iron hook with which ever and anon he encouraged them +to increase their pace. As dogs this terrible man treated and addressed +them, and as dogs they obeyed him. In person he was cadaverous [dead +looking] and blackavized [dark faced], and his hair was dressed in long +curls, which at a little distance looked like black candles, and gave a +singularly threatening expression to his handsome countenance. His eyes +were of the blue of the forget-me-not, and of a profound melancholy, +save when he was plunging his hook into you, at which time two red spots +appeared in them and lit them up horribly. In manner, something of the +grand seigneur still clung to him, so that he even ripped you up with +an air, and I have been told that he was a RACONTEUR [storyteller] of +repute. He was never more sinister than when he was most polite, +which is probably the truest test of breeding; and the elegance of his +diction, even when he was swearing, no less than the distinction of his +demeanour, showed him one of a different cast from his crew. A man of +indomitable courage, it was said that the only thing he shied at was +the sight of his own blood, which was thick and of an unusual colour. +In dress he somewhat aped the attire associated with the name of Charles +II, having heard it said in some earlier period of his career that he +bore a strange resemblance to the ill-fated Stuarts; and in his mouth +he had a holder of his own contrivance which enabled him to smoke two +cigars at once. But undoubtedly the grimmest part of him was his iron +claw. + +Let us now kill a pirate, to show Hook's method. Skylights will do. As +they pass, Skylights lurches clumsily against him, ruffling his lace +collar; the hook shoots forth, there is a tearing sound and one screech, +then the body is kicked aside, and the pirates pass on. He has not even +taken the cigars from his mouth. + +Such is the terrible man against whom Peter Pan is pitted. Which will +win? + +On the trail of the pirates, stealing noiselessly down the war-path, +which is not visible to inexperienced eyes, come the redskins, every one +of them with his eyes peeled. They carry tomahawks and knives, and their +naked bodies gleam with paint and oil. Strung around them are scalps, of +boys as well as of pirates, for these are the Piccaninny tribe, and not +to be confused with the softer-hearted Delawares or the Hurons. In +the van, on all fours, is Great Big Little Panther, a brave of so many +scalps that in his present position they somewhat impede his progress. +Bringing up the rear, the place of greatest danger, comes Tiger Lily, +proudly erect, a princess in her own right. She is the most beautiful +of dusky Dianas [Diana = goddess of the woods] and the belle of the +Piccaninnies, coquettish [flirting], cold and amorous [loving] by turns; +there is not a brave who would not have the wayward thing to wife, but +she staves off the altar with a hatchet. Observe how they pass over +fallen twigs without making the slightest noise. The only sound to be +heard is their somewhat heavy breathing. The fact is that they are all a +little fat just now after the heavy gorging, but in time they will work +this off. For the moment, however, it constitutes their chief danger. + +The redskins disappear as they have come like shadows, and soon their +place is taken by the beasts, a great and motley procession: lions, +tigers, bears, and the innumerable smaller savage things that flee +from them, for every kind of beast, and, more particularly, all the +man-eaters, live cheek by jowl on the favoured island. Their tongues are +hanging out, they are hungry to-night. + +When they have passed, comes the last figure of all, a gigantic +crocodile. We shall see for whom she is looking presently. + +The crocodile passes, but soon the boys appear again, for the procession +must continue indefinitely until one of the parties stops or changes its +pace. Then quickly they will be on top of each other. + +All are keeping a sharp look-out in front, but none suspects that the +danger may be creeping up from behind. This shows how real the island +was. + +The first to fall out of the moving circle was the boys. They flung +themselves down on the sward [turf], close to their underground home. + +“I do wish Peter would come back,” every one of them said nervously, +though in height and still more in breadth they were all larger than +their captain. + +“I am the only one who is not afraid of the pirates,” Slightly said, in +the tone that prevented his being a general favourite; but perhaps some +distant sound disturbed him, for he added hastily, “but I wish he +would come back, and tell us whether he has heard anything more about +Cinderella.” + +They talked of Cinderella, and Tootles was confident that his mother +must have been very like her. + +It was only in Peter's absence that they could speak of mothers, the +subject being forbidden by him as silly. + +“All I remember about my mother,” Nibs told them, “is that she often +said to my father, 'Oh, how I wish I had a cheque-book of my own!' I +don't know what a cheque-book is, but I should just love to give my +mother one.” + +While they talked they heard a distant sound. You or I, not being wild +things of the woods, would have heard nothing, but they heard it, and it +was the grim song: + + “Yo ho, yo ho, the pirate life, + The flag o' skull and bones, + A merry hour, a hempen rope, + And hey for Davy Jones.” + +At once the lost boys--but where are they? They are no longer there. +Rabbits could not have disappeared more quickly. + +I will tell you where they are. With the exception of Nibs, who has +darted away to reconnoitre [look around], they are already in their home +under the ground, a very delightful residence of which we shall see +a good deal presently. But how have they reached it? for there is no +entrance to be seen, not so much as a large stone, which if rolled away, +would disclose the mouth of a cave. Look closely, however, and you may +note that there are here seven large trees, each with a hole in its +hollow trunk as large as a boy. These are the seven entrances to the +home under the ground, for which Hook has been searching in vain these +many moons. Will he find it tonight? + +As the pirates advanced, the quick eye of Starkey sighted Nibs +disappearing through the wood, and at once his pistol flashed out. But +an iron claw gripped his shoulder. + +“Captain, let go!” he cried, writhing. + +Now for the first time we hear the voice of Hook. It was a black voice. +“Put back that pistol first,” it said threateningly. + +“It was one of those boys you hate. I could have shot him dead.” + +“Ay, and the sound would have brought Tiger Lily's redskins upon us. Do +you want to lose your scalp?” + +“Shall I after him, Captain,” asked pathetic Smee, “and tickle him +with Johnny Corkscrew?” Smee had pleasant names for everything, and his +cutlass was Johnny Corkscrew, because he wiggled it in the wound. One +could mention many lovable traits in Smee. For instance, after killing, +it was his spectacles he wiped instead of his weapon. + +“Johnny's a silent fellow,” he reminded Hook. + +“Not now, Smee,” Hook said darkly. “He is only one, and I want to +mischief all the seven. Scatter and look for them.” + +The pirates disappeared among the trees, and in a moment their Captain +and Smee were alone. Hook heaved a heavy sigh, and I know not why it +was, perhaps it was because of the soft beauty of the evening, but there +came over him a desire to confide to his faithful bo'sun the story of +his life. He spoke long and earnestly, but what it was all about Smee, +who was rather stupid, did not know in the least. + +Anon [later] he caught the word Peter. + +“Most of all,” Hook was saying passionately, “I want their captain, +Peter Pan. 'Twas he cut off my arm.” He brandished the hook +threateningly. “I've waited long to shake his hand with this. Oh, I'll +tear him!” + +“And yet,” said Smee, “I have often heard you say that hook was worth a +score of hands, for combing the hair and other homely uses.” + +“Ay,” the captain answered, “if I was a mother I would pray to have my +children born with this instead of that,” and he cast a look of pride +upon his iron hand and one of scorn upon the other. Then again he +frowned. + +“Peter flung my arm,” he said, wincing, “to a crocodile that happened to +be passing by.” + +“I have often,” said Smee, “noticed your strange dread of crocodiles.” + +“Not of crocodiles,” Hook corrected him, “but of that one crocodile.” He +lowered his voice. “It liked my arm so much, Smee, that it has followed +me ever since, from sea to sea and from land to land, licking its lips +for the rest of me.” + +“In a way,” said Smee, “it's sort of a compliment.” + +“I want no such compliments,” Hook barked petulantly. “I want Peter Pan, +who first gave the brute its taste for me.” + +He sat down on a large mushroom, and now there was a quiver in his +voice. “Smee,” he said huskily, “that crocodile would have had me before +this, but by a lucky chance it swallowed a clock which goes tick tick +inside it, and so before it can reach me I hear the tick and bolt.” He +laughed, but in a hollow way. + +“Some day,” said Smee, “the clock will run down, and then he'll get +you.” + +Hook wetted his dry lips. “Ay,” he said, “that's the fear that haunts +me.” + +Since sitting down he had felt curiously warm. “Smee,” he said, “this +seat is hot.” He jumped up. “Odds bobs, hammer and tongs I'm burning.” + +They examined the mushroom, which was of a size and solidity unknown +on the mainland; they tried to pull it up, and it came away at once in +their hands, for it had no root. Stranger still, smoke began at once +to ascend. The pirates looked at each other. “A chimney!” they both +exclaimed. + +They had indeed discovered the chimney of the home under the ground. It +was the custom of the boys to stop it with a mushroom when enemies were +in the neighbourhood. + +Not only smoke came out of it. There came also children's voices, for +so safe did the boys feel in their hiding-place that they were gaily +chattering. The pirates listened grimly, and then replaced the mushroom. +They looked around them and noted the holes in the seven trees. + +“Did you hear them say Peter Pan's from home?” Smee whispered, fidgeting +with Johnny Corkscrew. + +Hook nodded. He stood for a long time lost in thought, and at last a +curdling smile lit up his swarthy face. Smee had been waiting for it. +“Unrip your plan, captain,” he cried eagerly. + +“To return to the ship,” Hook replied slowly through his teeth, “and +cook a large rich cake of a jolly thickness with green sugar on it. +There can be but one room below, for there is but one chimney. The silly +moles had not the sense to see that they did not need a door apiece. +That shows they have no mother. We will leave the cake on the shore +of the Mermaids' Lagoon. These boys are always swimming about there, +playing with the mermaids. They will find the cake and they will gobble +it up, because, having no mother, they don't know how dangerous 'tis to +eat rich damp cake.” He burst into laughter, not hollow laughter now, +but honest laughter. “Aha, they will die.” + +Smee had listened with growing admiration. + +“It's the wickedest, prettiest policy ever I heard of!” he cried, and in +their exultation they danced and sang: + + “Avast, belay, when I appear, + By fear they're overtook; + Nought's left upon your bones when you + Have shaken claws with Hook.” + +They began the verse, but they never finished it, for another sound +broke in and stilled them. There was at first such a tiny sound that a +leaf might have fallen on it and smothered it, but as it came nearer it +was more distinct. + +Tick tick tick tick! + +Hook stood shuddering, one foot in the air. + +“The crocodile!” he gasped, and bounded away, followed by his bo'sun. + +It was indeed the crocodile. It had passed the redskins, who were now on +the trail of the other pirates. It oozed on after Hook. + +Once more the boys emerged into the open; but the dangers of the night +were not yet over, for presently Nibs rushed breathless into their +midst, pursued by a pack of wolves. The tongues of the pursuers were +hanging out; the baying of them was horrible. + +“Save me, save me!” cried Nibs, falling on the ground. + +“But what can we do, what can we do?” + +It was a high compliment to Peter that at that dire moment their +thoughts turned to him. + +“What would Peter do?” they cried simultaneously. + +Almost in the same breath they cried, “Peter would look at them through +his legs.” + +And then, “Let us do what Peter would do.” + +It is quite the most successful way of defying wolves, and as one boy +they bent and looked through their legs. The next moment is the long +one, but victory came quickly, for as the boys advanced upon them in the +terrible attitude, the wolves dropped their tails and fled. + +Now Nibs rose from the ground, and the others thought that his staring +eyes still saw the wolves. But it was not wolves he saw. + +“I have seen a wonderfuller thing,” he cried, as they gathered round him +eagerly. “A great white bird. It is flying this way.” + +“What kind of a bird, do you think?” + +“I don't know,” Nibs said, awestruck, “but it looks so weary, and as it +flies it moans, 'Poor Wendy.'” + +“Poor Wendy?” + +“I remember,” said Slightly instantly, “there are birds called Wendies.” + +“See, it comes!” cried Curly, pointing to Wendy in the heavens. + +Wendy was now almost overhead, and they could hear her plaintive cry. +But more distinct came the shrill voice of Tinker Bell. The jealous +fairy had now cast off all disguise of friendship, and was darting +at her victim from every direction, pinching savagely each time she +touched. + +“Hullo, Tink,” cried the wondering boys. + +Tink's reply rang out: “Peter wants you to shoot the Wendy.” + +It was not in their nature to question when Peter ordered. “Let us do +what Peter wishes!” cried the simple boys. “Quick, bows and arrows!” + +All but Tootles popped down their trees. He had a bow and arrow with +him, and Tink noted it, and rubbed her little hands. + +“Quick, Tootles, quick,” she screamed. “Peter will be so pleased.” + +Tootles excitedly fitted the arrow to his bow. “Out of the way, Tink,” + he shouted, and then he fired, and Wendy fluttered to the ground with an +arrow in her breast. + + + + +Chapter 6 THE LITTLE HOUSE + +Foolish Tootles was standing like a conqueror over Wendy's body when the +other boys sprang, armed, from their trees. + +“You are too late,” he cried proudly, “I have shot the Wendy. Peter will +be so pleased with me.” + +Overhead Tinker Bell shouted “Silly ass!” and darted into hiding. The +others did not hear her. They had crowded round Wendy, and as they +looked a terrible silence fell upon the wood. If Wendy's heart had been +beating they would all have heard it. + +Slightly was the first to speak. “This is no bird,” he said in a scared +voice. “I think this must be a lady.” + +“A lady?” said Tootles, and fell a-trembling. + +“And we have killed her,” Nibs said hoarsely. + +They all whipped off their caps. + +“Now I see,” Curly said: “Peter was bringing her to us.” He threw +himself sorrowfully on the ground. + +“A lady to take care of us at last,” said one of the twins, “and you +have killed her!” + +They were sorry for him, but sorrier for themselves, and when he took a +step nearer them they turned from him. + +Tootles' face was very white, but there was a dignity about him now that +had never been there before. + +“I did it,” he said, reflecting. “When ladies used to come to me in +dreams, I said, 'Pretty mother, pretty mother.' But when at last she +really came, I shot her.” + +He moved slowly away. + +“Don't go,” they called in pity. + +“I must,” he answered, shaking; “I am so afraid of Peter.” + +It was at this tragic moment that they heard a sound which made the +heart of every one of them rise to his mouth. They heard Peter crow. + +“Peter!” they cried, for it was always thus that he signalled his +return. + +“Hide her,” they whispered, and gathered hastily around Wendy. But +Tootles stood aloof. + +Again came that ringing crow, and Peter dropped in front of them. +“Greetings, boys,” he cried, and mechanically they saluted, and then +again was silence. + +He frowned. + +“I am back,” he said hotly, “why do you not cheer?” + +They opened their mouths, but the cheers would not come. He overlooked +it in his haste to tell the glorious tidings. + +“Great news, boys,” he cried, “I have brought at last a mother for you +all.” + +Still no sound, except a little thud from Tootles as he dropped on his +knees. + +“Have you not seen her?” asked Peter, becoming troubled. “She flew this +way.” + +“Ah me!” one voice said, and another said, “Oh, mournful day.” + +Tootles rose. “Peter,” he said quietly, “I will show her to you,” and +when the others would still have hidden her he said, “Back, twins, let +Peter see.” + +So they all stood back, and let him see, and after he had looked for a +little time he did not know what to do next. + +“She is dead,” he said uncomfortably. “Perhaps she is frightened at +being dead.” + +He thought of hopping off in a comic sort of way till he was out of +sight of her, and then never going near the spot any more. They would +all have been glad to follow if he had done this. + +But there was the arrow. He took it from her heart and faced his band. + +“Whose arrow?” he demanded sternly. + +“Mine, Peter,” said Tootles on his knees. + +“Oh, dastard hand,” Peter said, and he raised the arrow to use it as a +dagger. + +Tootles did not flinch. He bared his breast. “Strike, Peter,” he said +firmly, “strike true.” + +Twice did Peter raise the arrow, and twice did his hand fall. “I cannot +strike,” he said with awe, “there is something stays my hand.” + +All looked at him in wonder, save Nibs, who fortunately looked at Wendy. + +“It is she,” he cried, “the Wendy lady, see, her arm!” + +Wonderful to relate [tell], Wendy had raised her arm. Nibs bent over +her and listened reverently. “I think she said, 'Poor Tootles,'” he +whispered. + +“She lives,” Peter said briefly. + +Slightly cried instantly, “The Wendy lady lives.” + +Then Peter knelt beside her and found his button. You remember she had +put it on a chain that she wore round her neck. + +“See,” he said, “the arrow struck against this. It is the kiss I gave +her. It has saved her life.” + +“I remember kisses,” Slightly interposed quickly, “let me see it. Ay, +that's a kiss.” + +Peter did not hear him. He was begging Wendy to get better quickly, so +that he could show her the mermaids. Of course she could not answer yet, +being still in a frightful faint; but from overhead came a wailing note. + +“Listen to Tink,” said Curly, “she is crying because the Wendy lives.” + +Then they had to tell Peter of Tink's crime, and almost never had they +seen him look so stern. + +“Listen, Tinker Bell,” he cried, “I am your friend no more. Begone from +me for ever.” + +She flew on to his shoulder and pleaded, but he brushed her off. Not +until Wendy again raised her arm did he relent sufficiently to say, +“Well, not for ever, but for a whole week.” + +Do you think Tinker Bell was grateful to Wendy for raising her arm? Oh +dear no, never wanted to pinch her so much. Fairies indeed are strange, +and Peter, who understood them best, often cuffed [slapped] them. + +But what to do with Wendy in her present delicate state of health? + +“Let us carry her down into the house,” Curly suggested. + +“Ay,” said Slightly, “that is what one does with ladies.” + +“No, no,” Peter said, “you must not touch her. It would not be +sufficiently respectful.” + +“That,” said Slightly, “is what I was thinking.” + +“But if she lies there,” Tootles said, “she will die.” + +“Ay, she will die,” Slightly admitted, “but there is no way out.” + +“Yes, there is,” cried Peter. “Let us build a little house round her.” + +They were all delighted. “Quick,” he ordered them, “bring me each of you +the best of what we have. Gut our house. Be sharp.” + +In a moment they were as busy as tailors the night before a wedding. +They skurried this way and that, down for bedding, up for firewood, and +while they were at it, who should appear but John and Michael. As they +dragged along the ground they fell asleep standing, stopped, woke up, +moved another step and slept again. + +“John, John,” Michael would cry, “wake up! Where is Nana, John, and +mother?” + +And then John would rub his eyes and mutter, “It is true, we did fly.” + +You may be sure they were very relieved to find Peter. + +“Hullo, Peter,” they said. + +“Hullo,” replied Peter amicably, though he had quite forgotten them. +He was very busy at the moment measuring Wendy with his feet to see +how large a house she would need. Of course he meant to leave room for +chairs and a table. John and Michael watched him. + +“Is Wendy asleep?” they asked. + +“Yes.” + +“John,” Michael proposed, “let us wake her and get her to make supper +for us,” but as he said it some of the other boys rushed on carrying +branches for the building of the house. “Look at them!” he cried. + +“Curly,” said Peter in his most captainy voice, “see that these boys +help in the building of the house.” + +“Ay, ay, sir.” + +“Build a house?” exclaimed John. + +“For the Wendy,” said Curly. + +“For Wendy?” John said, aghast. “Why, she is only a girl!” + +“That,” explained Curly, “is why we are her servants.” + +“You? Wendy's servants!” + +“Yes,” said Peter, “and you also. Away with them.” + +The astounded brothers were dragged away to hack and hew and carry. +“Chairs and a fender [fireplace] first,” Peter ordered. “Then we shall +build a house round them.” + +“Ay,” said Slightly, “that is how a house is built; it all comes back to +me.” + +Peter thought of everything. “Slightly,” he cried, “fetch a doctor.” + +“Ay, ay,” said Slightly at once, and disappeared, scratching his head. +But he knew Peter must be obeyed, and he returned in a moment, wearing +John's hat and looking solemn. + +“Please, sir,” said Peter, going to him, “are you a doctor?” + +The difference between him and the other boys at such a time was that +they knew it was make-believe, while to him make-believe and true were +exactly the same thing. This sometimes troubled them, as when they had +to make-believe that they had had their dinners. + +If they broke down in their make-believe he rapped them on the knuckles. + +“Yes, my little man,” Slightly anxiously replied, who had chapped +knuckles. + +“Please, sir,” Peter explained, “a lady lies very ill.” + +She was lying at their feet, but Slightly had the sense not to see her. + +“Tut, tut, tut,” he said, “where does she lie?” + +“In yonder glade.” + +“I will put a glass thing in her mouth,” said Slightly, and he +made-believe to do it, while Peter waited. It was an anxious moment when +the glass thing was withdrawn. + +“How is she?” inquired Peter. + +“Tut, tut, tut,” said Slightly, “this has cured her.” + +“I am glad!” Peter cried. + +“I will call again in the evening,” Slightly said; “give her beef tea +out of a cup with a spout to it;” but after he had returned the hat +to John he blew big breaths, which was his habit on escaping from a +difficulty. + +In the meantime the wood had been alive with the sound of axes; almost +everything needed for a cosy dwelling already lay at Wendy's feet. + +“If only we knew,” said one, “the kind of house she likes best.” + +“Peter,” shouted another, “she is moving in her sleep.” + +“Her mouth opens,” cried a third, looking respectfully into it. “Oh, +lovely!” + +“Perhaps she is going to sing in her sleep,” said Peter. “Wendy, sing +the kind of house you would like to have.” + +Immediately, without opening her eyes, Wendy began to sing: + + “I wish I had a pretty house, + The littlest ever seen, + With funny little red walls + And roof of mossy green.” + +They gurgled with joy at this, for by the greatest good luck the +branches they had brought were sticky with red sap, and all the ground +was carpeted with moss. As they rattled up the little house they broke +into song themselves: + + “We've built the little walls and roof + And made a lovely door, + So tell us, mother Wendy, + What are you wanting more?” + +To this she answered greedily: + + “Oh, really next I think I'll have + Gay windows all about, + With roses peeping in, you know, + And babies peeping out.” + +With a blow of their fists they made windows, and large yellow leaves +were the blinds. But roses--? + +“Roses,” cried Peter sternly. + +Quickly they made-believe to grow the loveliest roses up the walls. + +Babies? + +To prevent Peter ordering babies they hurried into song again: + + “We've made the roses peeping out, + The babes are at the door, + We cannot make ourselves, you know, + 'cos we've been made before.” + +Peter, seeing this to be a good idea, at once pretended that it was his +own. The house was quite beautiful, and no doubt Wendy was very cosy +within, though, of course, they could no longer see her. Peter strode +up and down, ordering finishing touches. Nothing escaped his eagle eyes. +Just when it seemed absolutely finished: + +“There's no knocker on the door,” he said. + +They were very ashamed, but Tootles gave the sole of his shoe, and it +made an excellent knocker. + +Absolutely finished now, they thought. + +Not of bit of it. “There's no chimney,” Peter said; “we must have a +chimney.” + +“It certainly does need a chimney,” said John importantly. This gave +Peter an idea. He snatched the hat off John's head, knocked out the +bottom [top], and put the hat on the roof. The little house was so +pleased to have such a capital chimney that, as if to say thank you, +smoke immediately began to come out of the hat. + +Now really and truly it was finished. Nothing remained to do but to +knock. + +“All look your best,” Peter warned them; “first impressions are awfully +important.” + +He was glad no one asked him what first impressions are; they were all +too busy looking their best. + +He knocked politely, and now the wood was as still as the children, not +a sound to be heard except from Tinker Bell, who was watching from a +branch and openly sneering. + +What the boys were wondering was, would any one answer the knock? If a +lady, what would she be like? + +The door opened and a lady came out. It was Wendy. They all whipped off +their hats. + +She looked properly surprised, and this was just how they had hoped she +would look. + +“Where am I?” she said. + +Of course Slightly was the first to get his word in. “Wendy lady,” he +said rapidly, “for you we built this house.” + +“Oh, say you're pleased,” cried Nibs. + +“Lovely, darling house,” Wendy said, and they were the very words they +had hoped she would say. + +“And we are your children,” cried the twins. + +Then all went on their knees, and holding out their arms cried, “O Wendy +lady, be our mother.” + +“Ought I?” Wendy said, all shining. “Of course it's frightfully +fascinating, but you see I am only a little girl. I have no real +experience.” + +“That doesn't matter,” said Peter, as if he were the only person present +who knew all about it, though he was really the one who knew least. +“What we need is just a nice motherly person.” + +“Oh dear!” Wendy said, “you see, I feel that is exactly what I am.” + +“It is, it is,” they all cried; “we saw it at once.” + +“Very well,” she said, “I will do my best. Come inside at once, you +naughty children; I am sure your feet are damp. And before I put you to +bed I have just time to finish the story of Cinderella.” + +In they went; I don't know how there was room for them, but you can +squeeze very tight in the Neverland. And that was the first of the many +joyous evenings they had with Wendy. By and by she tucked them up in the +great bed in the home under the trees, but she herself slept that night +in the little house, and Peter kept watch outside with drawn sword, for +the pirates could be heard carousing far away and the wolves were on the +prowl. The little house looked so cosy and safe in the darkness, with +a bright light showing through its blinds, and the chimney smoking +beautifully, and Peter standing on guard. After a time he fell asleep, +and some unsteady fairies had to climb over him on their way home from +an orgy. Any of the other boys obstructing the fairy path at night they +would have mischiefed, but they just tweaked Peter's nose and passed on. + + + + +Chapter 7 THE HOME UNDER THE GROUND + +One of the first things Peter did next day was to measure Wendy and John +and Michael for hollow trees. Hook, you remember, had sneered at the +boys for thinking they needed a tree apiece, but this was ignorance, for +unless your tree fitted you it was difficult to go up and down, and no +two of the boys were quite the same size. Once you fitted, you drew in +[let out] your breath at the top, and down you went at exactly the +right speed, while to ascend you drew in and let out alternately, and so +wriggled up. Of course, when you have mastered the action you are able +to do these things without thinking of them, and nothing can be more +graceful. + +But you simply must fit, and Peter measures you for your tree as +carefully as for a suit of clothes: the only difference being that the +clothes are made to fit you, while you have to be made to fit the tree. +Usually it is done quite easily, as by your wearing too many garments +or too few, but if you are bumpy in awkward places or the only available +tree is an odd shape, Peter does some things to you, and after that you +fit. Once you fit, great care must be taken to go on fitting, and this, +as Wendy was to discover to her delight, keeps a whole family in perfect +condition. + +Wendy and Michael fitted their trees at the first try, but John had to +be altered a little. + +After a few days' practice they could go up and down as gaily as buckets +in a well. And how ardently they grew to love their home under the +ground; especially Wendy. It consisted of one large room, as all houses +should do, with a floor in which you could dig [for worms] if you wanted +to go fishing, and in this floor grew stout mushrooms of a charming +colour, which were used as stools. A Never tree tried hard to grow in +the centre of the room, but every morning they sawed the trunk through, +level with the floor. By tea-time it was always about two feet high, and +then they put a door on top of it, the whole thus becoming a table; +as soon as they cleared away, they sawed off the trunk again, and thus +there was more room to play. There was an enormous fireplace which was +in almost any part of the room where you cared to light it, and across +this Wendy stretched strings, made of fibre, from which she suspended +her washing. The bed was tilted against the wall by day, and let down at +6:30, when it filled nearly half the room; and all the boys slept in it, +except Michael, lying like sardines in a tin. There was a strict rule +against turning round until one gave the signal, when all turned at +once. Michael should have used it also, but Wendy would have [desired] +a baby, and he was the littlest, and you know what women are, and the +short and long of it is that he was hung up in a basket. + +It was rough and simple, and not unlike what baby bears would have made +of an underground house in the same circumstances. But there was one +recess in the wall, no larger than a bird-cage, which was the private +apartment of Tinker Bell. It could be shut off from the rest of +the house by a tiny curtain, which Tink, who was most fastidious +[particular], always kept drawn when dressing or undressing. No woman, +however large, could have had a more exquisite boudoir [dressing room] +and bed-chamber combined. The couch, as she always called it, was +a genuine Queen Mab, with club legs; and she varied the bedspreads +according to what fruit-blossom was in season. Her mirror was a +Puss-in-Boots, of which there are now only three, unchipped, known to +fairy dealers; the washstand was Pie-crust and reversible, the chest +of drawers an authentic Charming the Sixth, and the carpet and rugs the +best (the early) period of Margery and Robin. There was a chandelier +from Tiddlywinks for the look of the thing, but of course she lit the +residence herself. Tink was very contemptuous of the rest of the house, +as indeed was perhaps inevitable, and her chamber, though beautiful, +looked rather conceited, having the appearance of a nose permanently +turned up. + +I suppose it was all especially entrancing to Wendy, because those +rampagious boys of hers gave her so much to do. Really there were whole +weeks when, except perhaps with a stocking in the evening, she was never +above ground. The cooking, I can tell you, kept her nose to the pot, and +even if there was nothing in it, even if there was no pot, she had to +keep watching that it came aboil just the same. You never exactly +knew whether there would be a real meal or just a make-believe, it all +depended upon Peter's whim: he could eat, really eat, if it was part of +a game, but he could not stodge [cram down the food] just to feel +stodgy [stuffed with food], which is what most children like better than +anything else; the next best thing being to talk about it. Make-believe +was so real to him that during a meal of it you could see him getting +rounder. Of course it was trying, but you simply had to follow his lead, +and if you could prove to him that you were getting loose for your tree +he let you stodge. + +Wendy's favourite time for sewing and darning was after they had all +gone to bed. Then, as she expressed it, she had a breathing time for +herself; and she occupied it in making new things for them, and putting +double pieces on the knees, for they were all most frightfully hard on +their knees. + +When she sat down to a basketful of their stockings, every heel with a +hole in it, she would fling up her arms and exclaim, “Oh dear, I am sure +I sometimes think spinsters are to be envied!” + +Her face beamed when she exclaimed this. + +You remember about her pet wolf. Well, it very soon discovered that she +had come to the island and it found her out, and they just ran into each +other's arms. After that it followed her about everywhere. + +As time wore on did she think much about the beloved parents she had +left behind her? This is a difficult question, because it is quite +impossible to say how time does wear on in the Neverland, where it is +calculated by moons and suns, and there are ever so many more of them +than on the mainland. But I am afraid that Wendy did not really worry +about her father and mother; she was absolutely confident that they +would always keep the window open for her to fly back by, and this gave +her complete ease of mind. What did disturb her at times was that John +remembered his parents vaguely only, as people he had once known, while +Michael was quite willing to believe that she was really his mother. +These things scared her a little, and nobly anxious to do her duty, she +tried to fix the old life in their minds by setting them examination +papers on it, as like as possible to the ones she used to do at school. +The other boys thought this awfully interesting, and insisted on +joining, and they made slates for themselves, and sat round the table, +writing and thinking hard about the questions she had written on another +slate and passed round. They were the most ordinary questions--“What +was the colour of Mother's eyes? Which was taller, Father or Mother? Was +Mother blonde or brunette? Answer all three questions if possible.” + “(A) Write an essay of not less than 40 words on How I spent my last +Holidays, or The Characters of Father and Mother compared. Only one of +these to be attempted.” Or “(1) Describe Mother's laugh; (2) Describe +Father's laugh; (3) Describe Mother's Party Dress; (4) Describe the +Kennel and its Inmate.” + +They were just everyday questions like these, and when you could not +answer them you were told to make a cross; and it was really dreadful +what a number of crosses even John made. Of course the only boy who +replied to every question was Slightly, and no one could have been more +hopeful of coming out first, but his answers were perfectly ridiculous, +and he really came out last: a melancholy thing. + +Peter did not compete. For one thing he despised all mothers except +Wendy, and for another he was the only boy on the island who could +neither write nor spell; not the smallest word. He was above all that +sort of thing. + +By the way, the questions were all written in the past tense. What +was the colour of Mother's eyes, and so on. Wendy, you see, had been +forgetting, too. + +Adventures, of course, as we shall see, were of daily occurrence; but +about this time Peter invented, with Wendy's help, a new game that +fascinated him enormously, until he suddenly had no more interest in it, +which, as you have been told, was what always happened with his games. +It consisted in pretending not to have adventures, in doing the sort of +thing John and Michael had been doing all their lives, sitting on stools +flinging balls in the air, pushing each other, going out for walks and +coming back without having killed so much as a grizzly. To see Peter +doing nothing on a stool was a great sight; he could not help looking +solemn at such times, to sit still seemed to him such a comic thing to +do. He boasted that he had gone walking for the good of his health. For +several suns these were the most novel of all adventures to him; and +John and Michael had to pretend to be delighted also; otherwise he would +have treated them severely. + +He often went out alone, and when he came back you were never absolutely +certain whether he had had an adventure or not. He might have forgotten +it so completely that he said nothing about it; and then when you went +out you found the body; and, on the other hand, he might say a great +deal about it, and yet you could not find the body. Sometimes he came +home with his head bandaged, and then Wendy cooed over him and bathed +it in lukewarm water, while he told a dazzling tale. But she was never +quite sure, you know. There were, however, many adventures which she +knew to be true because she was in them herself, and there were still +more that were at least partly true, for the other boys were in them and +said they were wholly true. To describe them all would require a book as +large as an English-Latin, Latin-English Dictionary, and the most we can +do is to give one as a specimen of an average hour on the island. The +difficulty is which one to choose. Should we take the brush with the +redskins at Slightly Gulch? It was a sanguinary affair, and +especially interesting as showing one of Peter's peculiarities, which +was that in the middle of a fight he would suddenly change sides. At the +Gulch, when victory was still in the balance, sometimes leaning this way +and sometimes that, he called out, “I'm redskin to-day; what are you, +Tootles?” And Tootles answered, “Redskin; what are you, Nibs?” and +Nibs said, “Redskin; what are you Twin?” and so on; and they were all +redskins; and of course this would have ended the fight had not the real +redskins fascinated by Peter's methods, agreed to be lost boys for that +once, and so at it they all went again, more fiercely than ever. + +The extraordinary upshot of this adventure was--but we have not decided +yet that this is the adventure we are to narrate. Perhaps a better one +would be the night attack by the redskins on the house under the ground, +when several of them stuck in the hollow trees and had to be pulled out +like corks. Or we might tell how Peter saved Tiger Lily's life in the +Mermaids' Lagoon, and so made her his ally. + +Or we could tell of that cake the pirates cooked so that the boys might +eat it and perish; and how they placed it in one cunning spot after +another; but always Wendy snatched it from the hands of her children, so +that in time it lost its succulence, and became as hard as a stone, and +was used as a missile, and Hook fell over it in the dark. + +Or suppose we tell of the birds that were Peter's friends, particularly +of the Never bird that built in a tree overhanging the lagoon, and how +the nest fell into the water, and still the bird sat on her eggs, and +Peter gave orders that she was not to be disturbed. That is a pretty +story, and the end shows how grateful a bird can be; but if we tell +it we must also tell the whole adventure of the lagoon, which would +of course be telling two adventures rather than just one. A shorter +adventure, and quite as exciting, was Tinker Bell's attempt, with the +help of some street fairies, to have the sleeping Wendy conveyed on a +great floating leaf to the mainland. Fortunately the leaf gave way and +Wendy woke, thinking it was bath-time, and swam back. Or again, we might +choose Peter's defiance of the lions, when he drew a circle round him +on the ground with an arrow and dared them to cross it; and though he +waited for hours, with the other boys and Wendy looking on breathlessly +from trees, not one of them dared to accept his challenge. + +Which of these adventures shall we choose? The best way will be to toss +for it. + +I have tossed, and the lagoon has won. This almost makes one wish that +the gulch or the cake or Tink's leaf had won. Of course I could do it +again, and make it best out of three; however, perhaps fairest to stick +to the lagoon. + + + + +Chapter 8 THE MERMAIDS' LAGOON + +If you shut your eyes and are a lucky one, you may see at times a +shapeless pool of lovely pale colours suspended in the darkness; then +if you squeeze your eyes tighter, the pool begins to take shape, and the +colours become so vivid that with another squeeze they must go on fire. +But just before they go on fire you see the lagoon. This is the nearest +you ever get to it on the mainland, just one heavenly moment; if there +could be two moments you might see the surf and hear the mermaids +singing. + +The children often spent long summer days on this lagoon, swimming or +floating most of the time, playing the mermaid games in the water, +and so forth. You must not think from this that the mermaids were on +friendly terms with them: on the contrary, it was among Wendy's lasting +regrets that all the time she was on the island she never had a civil +word from one of them. When she stole softly to the edge of the lagoon +she might see them by the score, especially on Marooners' Rock, where +they loved to bask, combing out their hair in a lazy way that quite +irritated her; or she might even swim, on tiptoe as it were, to within +a yard of them, but then they saw her and dived, probably splashing her +with their tails, not by accident, but intentionally. + +They treated all the boys in the same way, except of course Peter, who +chatted with them on Marooners' Rock by the hour, and sat on their tails +when they got cheeky. He gave Wendy one of their combs. + +The most haunting time at which to see them is at the turn of the moon, +when they utter strange wailing cries; but the lagoon is dangerous for +mortals then, and until the evening of which we have now to tell, Wendy +had never seen the lagoon by moonlight, less from fear, for of course +Peter would have accompanied her, than because she had strict rules +about every one being in bed by seven. She was often at the lagoon, +however, on sunny days after rain, when the mermaids come up in +extraordinary numbers to play with their bubbles. The bubbles of many +colours made in rainbow water they treat as balls, hitting them gaily +from one to another with their tails, and trying to keep them in the +rainbow till they burst. The goals are at each end of the rainbow, and +the keepers only are allowed to use their hands. Sometimes a dozen of +these games will be going on in the lagoon at a time, and it is quite a +pretty sight. + +But the moment the children tried to join in they had to play by +themselves, for the mermaids immediately disappeared. Nevertheless we +have proof that they secretly watched the interlopers, and were not +above taking an idea from them; for John introduced a new way of hitting +the bubble, with the head instead of the hand, and the mermaids adopted +it. This is the one mark that John has left on the Neverland. + +It must also have been rather pretty to see the children resting on a +rock for half an hour after their mid-day meal. Wendy insisted on +their doing this, and it had to be a real rest even though the meal was +make-believe. So they lay there in the sun, and their bodies glistened +in it, while she sat beside them and looked important. + +It was one such day, and they were all on Marooners' Rock. The rock was +not much larger than their great bed, but of course they all knew how +not to take up much room, and they were dozing, or at least lying with +their eyes shut, and pinching occasionally when they thought Wendy was +not looking. She was very busy, stitching. + +While she stitched a change came to the lagoon. Little shivers ran over +it, and the sun went away and shadows stole across the water, turning +it cold. Wendy could no longer see to thread her needle, and when she +looked up, the lagoon that had always hitherto been such a laughing +place seemed formidable and unfriendly. + +It was not, she knew, that night had come, but something as dark as +night had come. No, worse than that. It had not come, but it had sent +that shiver through the sea to say that it was coming. What was it? + +There crowded upon her all the stories she had been told of Marooners' +Rock, so called because evil captains put sailors on it and leave +them there to drown. They drown when the tide rises, for then it is +submerged. + +Of course she should have roused the children at once; not merely +because of the unknown that was stalking toward them, but because it was +no longer good for them to sleep on a rock grown chilly. But she was +a young mother and she did not know this; she thought you simply must +stick to your rule about half an hour after the mid-day meal. So, though +fear was upon her, and she longed to hear male voices, she would not +waken them. Even when she heard the sound of muffled oars, though her +heart was in her mouth, she did not waken them. She stood over them to +let them have their sleep out. Was it not brave of Wendy? + +It was well for those boys then that there was one among them who could +sniff danger even in his sleep. Peter sprang erect, as wide awake at +once as a dog, and with one warning cry he roused the others. + +He stood motionless, one hand to his ear. + +“Pirates!” he cried. The others came closer to him. A strange smile was +playing about his face, and Wendy saw it and shuddered. While that smile +was on his face no one dared address him; all they could do was to stand +ready to obey. The order came sharp and incisive. + +“Dive!” + +There was a gleam of legs, and instantly the lagoon seemed deserted. +Marooners' Rock stood alone in the forbidding waters as if it were +itself marooned. + +The boat drew nearer. It was the pirate dinghy, with three figures in +her, Smee and Starkey, and the third a captive, no other than Tiger +Lily. Her hands and ankles were tied, and she knew what was to be her +fate. She was to be left on the rock to perish, an end to one of her +race more terrible than death by fire or torture, for is it not written +in the book of the tribe that there is no path through water to the +happy hunting-ground? Yet her face was impassive; she was the daughter +of a chief, she must die as a chief's daughter, it is enough. + +They had caught her boarding the pirate ship with a knife in her mouth. +No watch was kept on the ship, it being Hook's boast that the wind of +his name guarded the ship for a mile around. Now her fate would help to +guard it also. One more wail would go the round in that wind by night. + +In the gloom that they brought with them the two pirates did not see the +rock till they crashed into it. + +“Luff, you lubber,” cried an Irish voice that was Smee's; “here's the +rock. Now, then, what we have to do is to hoist the redskin on to it and +leave her here to drown.” + +It was the work of one brutal moment to land the beautiful girl on the +rock; she was too proud to offer a vain resistance. + +Quite near the rock, but out of sight, two heads were bobbing up and +down, Peter's and Wendy's. Wendy was crying, for it was the first +tragedy she had seen. Peter had seen many tragedies, but he had +forgotten them all. He was less sorry than Wendy for Tiger Lily: it was +two against one that angered him, and he meant to save her. An easy way +would have been to wait until the pirates had gone, but he was never one +to choose the easy way. + +There was almost nothing he could not do, and he now imitated the voice +of Hook. + +“Ahoy there, you lubbers!” he called. It was a marvellous imitation. + +“The captain!” said the pirates, staring at each other in surprise. + +“He must be swimming out to us,” Starkey said, when they had looked for +him in vain. + +“We are putting the redskin on the rock,” Smee called out. + +“Set her free,” came the astonishing answer. + +“Free!” + +“Yes, cut her bonds and let her go.” + +“But, captain--” + +“At once, d'ye hear,” cried Peter, “or I'll plunge my hook in you.” + +“This is queer!” Smee gasped. + +“Better do what the captain orders,” said Starkey nervously. + +“Ay, ay,” Smee said, and he cut Tiger Lily's cords. At once like an eel +she slid between Starkey's legs into the water. + +Of course Wendy was very elated over Peter's cleverness; but she knew +that he would be elated also and very likely crow and thus betray +himself, so at once her hand went out to cover his mouth. But it was +stayed even in the act, for “Boat ahoy!” rang over the lagoon in Hook's +voice, and this time it was not Peter who had spoken. + +Peter may have been about to crow, but his face puckered in a whistle of +surprise instead. + +“Boat ahoy!” again came the voice. + +Now Wendy understood. The real Hook was also in the water. + +He was swimming to the boat, and as his men showed a light to guide him +he had soon reached them. In the light of the lantern Wendy saw his hook +grip the boat's side; she saw his evil swarthy face as he rose dripping +from the water, and, quaking, she would have liked to swim away, but +Peter would not budge. He was tingling with life and also top-heavy with +conceit. “Am I not a wonder, oh, I am a wonder!” he whispered to her, +and though she thought so also, she was really glad for the sake of his +reputation that no one heard him except herself. + +He signed to her to listen. + +The two pirates were very curious to know what had brought their captain +to them, but he sat with his head on his hook in a position of profound +melancholy. + +“Captain, is all well?” they asked timidly, but he answered with a +hollow moan. + +“He sighs,” said Smee. + +“He sighs again,” said Starkey. + +“And yet a third time he sighs,” said Smee. + +Then at last he spoke passionately. + +“The game's up,” he cried, “those boys have found a mother.” + +Affrighted though she was, Wendy swelled with pride. + +“O evil day!” cried Starkey. + +“What's a mother?” asked the ignorant Smee. + +Wendy was so shocked that she exclaimed. “He doesn't know!” and always +after this she felt that if you could have a pet pirate Smee would be +her one. + +Peter pulled her beneath the water, for Hook had started up, crying, +“What was that?” + +“I heard nothing,” said Starkey, raising the lantern over the waters, +and as the pirates looked they saw a strange sight. It was the nest I +have told you of, floating on the lagoon, and the Never bird was sitting +on it. + +“See,” said Hook in answer to Smee's question, “that is a mother. What +a lesson! The nest must have fallen into the water, but would the mother +desert her eggs? No.” + +There was a break in his voice, as if for a moment he recalled innocent +days when--but he brushed away this weakness with his hook. + +Smee, much impressed, gazed at the bird as the nest was borne past, but +the more suspicious Starkey said, “If she is a mother, perhaps she is +hanging about here to help Peter.” + +Hook winced. “Ay,” he said, “that is the fear that haunts me.” + +He was roused from this dejection by Smee's eager voice. + +“Captain,” said Smee, “could we not kidnap these boys' mother and make +her our mother?” + +“It is a princely scheme,” cried Hook, and at once it took practical +shape in his great brain. “We will seize the children and carry them to +the boat: the boys we will make walk the plank, and Wendy shall be our +mother.” + +Again Wendy forgot herself. + +“Never!” she cried, and bobbed. + +“What was that?” + +But they could see nothing. They thought it must have been a leaf in the +wind. “Do you agree, my bullies?” asked Hook. + +“There is my hand on it,” they both said. + +“And there is my hook. Swear.” + +They all swore. By this time they were on the rock, and suddenly Hook +remembered Tiger Lily. + +“Where is the redskin?” he demanded abruptly. + +He had a playful humour at moments, and they thought this was one of the +moments. + +“That is all right, captain,” Smee answered complacently; “we let her +go.” + +“Let her go!” cried Hook. + +“'Twas your own orders,” the bo'sun faltered. + +“You called over the water to us to let her go,” said Starkey. + +“Brimstone and gall,” thundered Hook, “what cozening [cheating] is +going on here!” His face had gone black with rage, but he saw that they +believed their words, and he was startled. “Lads,” he said, shaking a +little, “I gave no such order.” + +“It is passing queer,” Smee said, and they all fidgeted uncomfortably. +Hook raised his voice, but there was a quiver in it. + +“Spirit that haunts this dark lagoon to-night,” he cried, “dost hear +me?” + +Of course Peter should have kept quiet, but of course he did not. He +immediately answered in Hook's voice: + +“Odds, bobs, hammer and tongs, I hear you.” + +In that supreme moment Hook did not blanch, even at the gills, but Smee +and Starkey clung to each other in terror. + +“Who are you, stranger? Speak!” Hook demanded. + +“I am James Hook,” replied the voice, “captain of the JOLLY ROGER.” + +“You are not; you are not,” Hook cried hoarsely. + +“Brimstone and gall,” the voice retorted, “say that again, and I'll cast +anchor in you.” + +Hook tried a more ingratiating manner. “If you are Hook,” he said almost +humbly, “come tell me, who am I?” + +“A codfish,” replied the voice, “only a codfish.” + +“A codfish!” Hook echoed blankly, and it was then, but not till then, +that his proud spirit broke. He saw his men draw back from him. + +“Have we been captained all this time by a codfish!” they muttered. “It +is lowering to our pride.” + +They were his dogs snapping at him, but, tragic figure though he had +become, he scarcely heeded them. Against such fearful evidence it was +not their belief in him that he needed, it was his own. He felt his ego +slipping from him. “Don't desert me, bully,” he whispered hoarsely to +it. + +In his dark nature there was a touch of the feminine, as in all the +great pirates, and it sometimes gave him intuitions. Suddenly he tried +the guessing game. + +“Hook,” he called, “have you another voice?” + +Now Peter could never resist a game, and he answered blithely in his own +voice, “I have.” + +“And another name?” + +“Ay, ay.” + +“Vegetable?” asked Hook. + +“No.” + +“Mineral?” + +“No.” + +“Animal?” + +“Yes.” + +“Man?” + +“No!” This answer rang out scornfully. + +“Boy?” + +“Yes.” + +“Ordinary boy?” + +“No!” + +“Wonderful boy?” + +To Wendy's pain the answer that rang out this time was “Yes.” + +“Are you in England?” + +“No.” + +“Are you here?” + +“Yes.” + +Hook was completely puzzled. “You ask him some questions,” he said to +the others, wiping his damp brow. + +Smee reflected. “I can't think of a thing,” he said regretfully. + +“Can't guess, can't guess!” crowed Peter. “Do you give it up?” + +Of course in his pride he was carrying the game too far, and the +miscreants [villains] saw their chance. + +“Yes, yes,” they answered eagerly. + +“Well, then,” he cried, “I am Peter Pan.” + +Pan! + +In a moment Hook was himself again, and Smee and Starkey were his +faithful henchmen. + +“Now we have him,” Hook shouted. “Into the water, Smee. Starkey, mind +the boat. Take him dead or alive!” + +He leaped as he spoke, and simultaneously came the gay voice of Peter. + +“Are you ready, boys?” + +“Ay, ay,” from various parts of the lagoon. + +“Then lam into the pirates.” + +The fight was short and sharp. First to draw blood was John, who +gallantly climbed into the boat and held Starkey. There was fierce +struggle, in which the cutlass was torn from the pirate's grasp. He +wriggled overboard and John leapt after him. The dinghy drifted away. + +Here and there a head bobbed up in the water, and there was a flash +of steel followed by a cry or a whoop. In the confusion some struck at +their own side. The corkscrew of Smee got Tootles in the fourth rib, but +he was himself pinked [nicked] in turn by Curly. Farther from the rock +Starkey was pressing Slightly and the twins hard. + +Where all this time was Peter? He was seeking bigger game. + +The others were all brave boys, and they must not be blamed for backing +from the pirate captain. His iron claw made a circle of dead water round +him, from which they fled like affrighted fishes. + +But there was one who did not fear him: there was one prepared to enter +that circle. + +Strangely, it was not in the water that they met. Hook rose to the rock +to breathe, and at the same moment Peter scaled it on the opposite +side. The rock was slippery as a ball, and they had to crawl rather than +climb. Neither knew that the other was coming. Each feeling for a grip +met the other's arm: in surprise they raised their heads; their faces +were almost touching; so they met. + +Some of the greatest heroes have confessed that just before they fell to +[began combat] they had a sinking [feeling in the stomach]. Had it been +so with Peter at that moment I would admit it. After all, he was the +only man that the Sea-Cook had feared. But Peter had no sinking, he had +one feeling only, gladness; and he gnashed his pretty teeth with joy. +Quick as thought he snatched a knife from Hook's belt and was about to +drive it home, when he saw that he was higher up the rock than his foe. +It would not have been fighting fair. He gave the pirate a hand to help +him up. + +It was then that Hook bit him. + +Not the pain of this but its unfairness was what dazed Peter. It made +him quite helpless. He could only stare, horrified. Every child is +affected thus the first time he is treated unfairly. All he thinks he +has a right to when he comes to you to be yours is fairness. After +you have been unfair to him he will love you again, but will never +afterwards be quite the same boy. No one ever gets over the first +unfairness; no one except Peter. He often met it, but he always forgot +it. I suppose that was the real difference between him and all the rest. + +So when he met it now it was like the first time; and he could just +stare, helpless. Twice the iron hand clawed him. + +A few moments afterwards the other boys saw Hook in the water striking +wildly for the ship; no elation on the pestilent face now, only white +fear, for the crocodile was in dogged pursuit of him. On ordinary +occasions the boys would have swum alongside cheering; but now they were +uneasy, for they had lost both Peter and Wendy, and were scouring the +lagoon for them, calling them by name. They found the dinghy and went +home in it, shouting “Peter, Wendy” as they went, but no answer came +save mocking laughter from the mermaids. “They must be swimming back or +flying,” the boys concluded. They were not very anxious, because they +had such faith in Peter. They chuckled, boylike, because they would be +late for bed; and it was all mother Wendy's fault! + +When their voices died away there came cold silence over the lagoon, and +then a feeble cry. + +“Help, help!” + +Two small figures were beating against the rock; the girl had fainted +and lay on the boy's arm. With a last effort Peter pulled her up the +rock and then lay down beside her. Even as he also fainted he saw that +the water was rising. He knew that they would soon be drowned, but he +could do no more. + +As they lay side by side a mermaid caught Wendy by the feet, and began +pulling her softly into the water. Peter, feeling her slip from him, +woke with a start, and was just in time to draw her back. But he had to +tell her the truth. + +“We are on the rock, Wendy,” he said, “but it is growing smaller. Soon +the water will be over it.” + +She did not understand even now. + +“We must go,” she said, almost brightly. + +“Yes,” he answered faintly. + +“Shall we swim or fly, Peter?” + +He had to tell her. + +“Do you think you could swim or fly as far as the island, Wendy, without +my help?” + +She had to admit that she was too tired. + +He moaned. + +“What is it?” she asked, anxious about him at once. + +“I can't help you, Wendy. Hook wounded me. I can neither fly nor swim.” + +“Do you mean we shall both be drowned?” + +“Look how the water is rising.” + +They put their hands over their eyes to shut out the sight. They thought +they would soon be no more. As they sat thus something brushed against +Peter as light as a kiss, and stayed there, as if saying timidly, “Can I +be of any use?” + +It was the tail of a kite, which Michael had made some days before. It +had torn itself out of his hand and floated away. + +“Michael's kite,” Peter said without interest, but next moment he had +seized the tail, and was pulling the kite toward him. + +“It lifted Michael off the ground,” he cried; “why should it not carry +you?” + +“Both of us!” + +“It can't lift two; Michael and Curly tried.” + +“Let us draw lots,” Wendy said bravely. + +“And you a lady; never.” Already he had tied the tail round her. She +clung to him; she refused to go without him; but with a “Good-bye, +Wendy,” he pushed her from the rock; and in a few minutes she was borne +out of his sight. Peter was alone on the lagoon. + +The rock was very small now; soon it would be submerged. Pale rays of +light tiptoed across the waters; and by and by there was to be heard a +sound at once the most musical and the most melancholy in the world: the +mermaids calling to the moon. + +Peter was not quite like other boys; but he was afraid at last. A +tremour ran through him, like a shudder passing over the sea; but on +the sea one shudder follows another till there are hundreds of them, and +Peter felt just the one. Next moment he was standing erect on the rock +again, with that smile on his face and a drum beating within him. It was +saying, “To die will be an awfully big adventure.” + + + + +Chapter 9 THE NEVER BIRD + +The last sound Peter heard before he was quite alone were the mermaids +retiring one by one to their bedchambers under the sea. He was too far +away to hear their doors shut; but every door in the coral caves where +they live rings a tiny bell when it opens or closes (as in all the +nicest houses on the mainland), and he heard the bells. + +Steadily the waters rose till they were nibbling at his feet; and to +pass the time until they made their final gulp, he watched the only +thing on the lagoon. He thought it was a piece of floating paper, +perhaps part of the kite, and wondered idly how long it would take to +drift ashore. + +Presently he noticed as an odd thing that it was undoubtedly out upon +the lagoon with some definite purpose, for it was fighting the tide, +and sometimes winning; and when it won, Peter, always sympathetic to +the weaker side, could not help clapping; it was such a gallant piece of +paper. + +It was not really a piece of paper; it was the Never bird, making +desperate efforts to reach Peter on the nest. By working her wings, in a +way she had learned since the nest fell into the water, she was able to +some extent to guide her strange craft, but by the time Peter recognised +her she was very exhausted. She had come to save him, to give him her +nest, though there were eggs in it. I rather wonder at the bird, for +though he had been nice to her, he had also sometimes tormented her. I +can suppose only that, like Mrs. Darling and the rest of them, she was +melted because he had all his first teeth. + +She called out to him what she had come for, and he called out to her +what she was doing there; but of course neither of them understood +the other's language. In fanciful stories people can talk to the birds +freely, and I wish for the moment I could pretend that this were such a +story, and say that Peter replied intelligently to the Never bird; but +truth is best, and I want to tell you only what really happened. Well, +not only could they not understand each other, but they forgot their +manners. + +“I--want--you--to--get--into--the--nest,” the bird called, speaking as +slowly and distinctly as possible, “and--then--you--can--drift--ashore, +but--I--am--too--tired--to--bring--it--any--nearer--so--you--must--try +to--swim--to--it.” + +“What are you quacking about?” Peter answered. “Why don't you let the +nest drift as usual?” + +“I--want--you--” the bird said, and repeated it all over. + +Then Peter tried slow and distinct. + +“What--are--you--quacking--about?” and so on. + +The Never bird became irritated; they have very short tempers. + +“You dunderheaded little jay!” she screamed, “Why don't you do as I tell +you?” + +Peter felt that she was calling him names, and at a venture he retorted +hotly: + +“So are you!” + +Then rather curiously they both snapped out the same remark: + +“Shut up!” + +“Shut up!” + +Nevertheless the bird was determined to save him if she could, and by +one last mighty effort she propelled the nest against the rock. Then up +she flew; deserting her eggs, so as to make her meaning clear. + +Then at last he understood, and clutched the nest and waved his thanks +to the bird as she fluttered overhead. It was not to receive his thanks, +however, that she hung there in the sky; it was not even to watch him +get into the nest; it was to see what he did with her eggs. + +There were two large white eggs, and Peter lifted them up and reflected. +The bird covered her face with her wings, so as not to see the last of +them; but she could not help peeping between the feathers. + +I forget whether I have told you that there was a stave on the rock, +driven into it by some buccaneers of long ago to mark the site of buried +treasure. The children had discovered the glittering hoard, and when in +a mischievous mood used to fling showers of moidores, diamonds, pearls +and pieces of eight to the gulls, who pounced upon them for food, and +then flew away, raging at the scurvy trick that had been played upon +them. The stave was still there, and on it Starkey had hung his hat, a +deep tarpaulin, watertight, with a broad brim. Peter put the eggs into +this hat and set it on the lagoon. It floated beautifully. + +The Never bird saw at once what he was up to, and screamed her +admiration of him; and, alas, Peter crowed his agreement with her. Then +he got into the nest, reared the stave in it as a mast, and hung up his +shirt for a sail. At the same moment the bird fluttered down upon the +hat and once more sat snugly on her eggs. She drifted in one direction, +and he was borne off in another, both cheering. + +Of course when Peter landed he beached his barque [small ship, actually +the Never Bird's nest in this particular case in point] in a place where +the bird would easily find it; but the hat was such a great success that +she abandoned the nest. It drifted about till it went to pieces, and +often Starkey came to the shore of the lagoon, and with many bitter +feelings watched the bird sitting on his hat. As we shall not see her +again, it may be worth mentioning here that all Never birds now build +in that shape of nest, with a broad brim on which the youngsters take an +airing. + +Great were the rejoicings when Peter reached the home under the ground +almost as soon as Wendy, who had been carried hither and thither by +the kite. Every boy had adventures to tell; but perhaps the biggest +adventure of all was that they were several hours late for bed. This so +inflated them that they did various dodgy things to get staying up still +longer, such as demanding bandages; but Wendy, though glorying in having +them all home again safe and sound, was scandalised by the lateness of +the hour, and cried, “To bed, to bed,” in a voice that had to be obeyed. +Next day, however, she was awfully tender, and gave out bandages to +every one, and they played till bed-time at limping about and carrying +their arms in slings. + + + + +Chapter 10 THE HAPPY HOME + +One important result of the brush [with the pirates] on the lagoon was +that it made the redskins their friends. Peter had saved Tiger Lily from +a dreadful fate, and now there was nothing she and her braves would not +do for him. All night they sat above, keeping watch over the home under +the ground and awaiting the big attack by the pirates which obviously +could not be much longer delayed. Even by day they hung about, smoking +the pipe of peace, and looking almost as if they wanted tit-bits to eat. + +They called Peter the Great White Father, prostrating themselves [lying +down] before him; and he liked this tremendously, so that it was not +really good for him. + +“The great white father,” he would say to them in a very lordly manner, +as they grovelled at his feet, “is glad to see the Piccaninny warriors +protecting his wigwam from the pirates.” + +“Me Tiger Lily,” that lovely creature would reply. “Peter Pan save me, +me his velly nice friend. Me no let pirates hurt him.” + +She was far too pretty to cringe in this way, but Peter thought it his +due, and he would answer condescendingly, “It is good. Peter Pan has +spoken.” + +Always when he said, “Peter Pan has spoken,” it meant that they must now +shut up, and they accepted it humbly in that spirit; but they were by +no means so respectful to the other boys, whom they looked upon as just +ordinary braves. They said “How-do?” to them, and things like that; and +what annoyed the boys was that Peter seemed to think this all right. + +Secretly Wendy sympathised with them a little, but she was far too loyal +a housewife to listen to any complaints against father. “Father knows +best,” she always said, whatever her private opinion must be. Her +private opinion was that the redskins should not call her a squaw. + +We have now reached the evening that was to be known among them as the +Night of Nights, because of its adventures and their upshot. The day, as +if quietly gathering its forces, had been almost uneventful, and now the +redskins in their blankets were at their posts above, while, below, the +children were having their evening meal; all except Peter, who had gone +out to get the time. The way you got the time on the island was to find +the crocodile, and then stay near him till the clock struck. + +The meal happened to be a make-believe tea, and they sat around the +board, guzzling in their greed; and really, what with their chatter and +recriminations, the noise, as Wendy said, was positively deafening. +To be sure, she did not mind noise, but she simply would not have them +grabbing things, and then excusing themselves by saying that Tootles had +pushed their elbow. There was a fixed rule that they must never hit back +at meals, but should refer the matter of dispute to Wendy by raising +the right arm politely and saying, “I complain of so-and-so;” but what +usually happened was that they forgot to do this or did it too much. + +“Silence,” cried Wendy when for the twentieth time she had told them +that they were not all to speak at once. “Is your mug empty, Slightly +darling?” + +“Not quite empty, mummy,” Slightly said, after looking into an imaginary +mug. + +“He hasn't even begun to drink his milk,” Nibs interposed. + +This was telling, and Slightly seized his chance. + +“I complain of Nibs,” he cried promptly. + +John, however, had held up his hand first. + +“Well, John?” + +“May I sit in Peter's chair, as he is not here?” + +“Sit in father's chair, John!” Wendy was scandalised. “Certainly not.” + +“He is not really our father,” John answered. “He didn't even know how a +father does till I showed him.” + +This was grumbling. “We complain of John,” cried the twins. + +Tootles held up his hand. He was so much the humblest of them, indeed he +was the only humble one, that Wendy was specially gentle with him. + +“I don't suppose,” Tootles said diffidently [bashfully or timidly], +“that I could be father.” + +“No, Tootles.” + +Once Tootles began, which was not very often, he had a silly way of +going on. + +“As I can't be father,” he said heavily, “I don't suppose, Michael, you +would let me be baby?” + +“No, I won't,” Michael rapped out. He was already in his basket. + +“As I can't be baby,” Tootles said, getting heavier and heavier and +heavier, “do you think I could be a twin?” + +“No, indeed,” replied the twins; “it's awfully difficult to be a twin.” + +“As I can't be anything important,” said Tootles, “would any of you like +to see me do a trick?” + +“No,” they all replied. + +Then at last he stopped. “I hadn't really any hope,” he said. + +The hateful telling broke out again. + +“Slightly is coughing on the table.” + +“The twins began with cheese-cakes.” + +“Curly is taking both butter and honey.” + +“Nibs is speaking with his mouth full.” + +“I complain of the twins.” + +“I complain of Curly.” + +“I complain of Nibs.” + +“Oh dear, oh dear,” cried Wendy, “I'm sure I sometimes think that +spinsters are to be envied.” + +She told them to clear away, and sat down to her work-basket, a heavy +load of stockings and every knee with a hole in it as usual. + +“Wendy,” remonstrated [scolded] Michael, “I'm too big for a cradle.” + +“I must have somebody in a cradle,” she said almost tartly, “and you +are the littlest. A cradle is such a nice homely thing to have about a +house.” + +While she sewed they played around her; such a group of happy faces +and dancing limbs lit up by that romantic fire. It had become a very +familiar scene, this, in the home under the ground, but we are looking +on it for the last time. + +There was a step above, and Wendy, you may be sure, was the first to +recognize it. + +“Children, I hear your father's step. He likes you to meet him at the +door.” + +Above, the redskins crouched before Peter. + +“Watch well, braves. I have spoken.” + +And then, as so often before, the gay children dragged him from his +tree. As so often before, but never again. + +He had brought nuts for the boys as well as the correct time for Wendy. + +“Peter, you just spoil them, you know,” Wendy simpered [exaggerated a +smile]. + +“Ah, old lady,” said Peter, hanging up his gun. + +“It was me told him mothers are called old lady,” Michael whispered to +Curly. + +“I complain of Michael,” said Curly instantly. + +The first twin came to Peter. “Father, we want to dance.” + +“Dance away, my little man,” said Peter, who was in high good humour. + +“But we want you to dance.” + +Peter was really the best dancer among them, but he pretended to be +scandalised. + +“Me! My old bones would rattle!” + +“And mummy too.” + +“What,” cried Wendy, “the mother of such an armful, dance!” + +“But on a Saturday night,” Slightly insinuated. + +It was not really Saturday night, at least it may have been, for +they had long lost count of the days; but always if they wanted to do +anything special they said this was Saturday night, and then they did +it. + +“Of course it is Saturday night, Peter,” Wendy said, relenting. + +“People of our figure, Wendy!” + +“But it is only among our own progeny [children].” + +“True, true.” + +So they were told they could dance, but they must put on their nighties +first. + +“Ah, old lady,” Peter said aside to Wendy, warming himself by the fire +and looking down at her as she sat turning a heel, “there is nothing +more pleasant of an evening for you and me when the day's toil is over +than to rest by the fire with the little ones near by.” + +“It is sweet, Peter, isn't it?” Wendy said, frightfully gratified. +“Peter, I think Curly has your nose.” + +“Michael takes after you.” + +She went to him and put her hand on his shoulder. + +“Dear Peter,” she said, “with such a large family, of course, I have now +passed my best, but you don't want to [ex]change me, do you?” + +“No, Wendy.” + +Certainly he did not want a change, but he looked at her uncomfortably, +blinking, you know, like one not sure whether he was awake or asleep. + +“Peter, what is it?” + +“I was just thinking,” he said, a little scared. “It is only +make-believe, isn't it, that I am their father?” + +“Oh yes,” Wendy said primly [formally and properly]. + +“You see,” he continued apologetically, “it would make me seem so old to +be their real father.” + +“But they are ours, Peter, yours and mine.” + +“But not really, Wendy?” he asked anxiously. + +“Not if you don't wish it,” she replied; and she distinctly heard his +sigh of relief. “Peter,” she asked, trying to speak firmly, “what are +your exact feelings to [about] me?” + +“Those of a devoted son, Wendy.” + +“I thought so,” she said, and went and sat by herself at the extreme end +of the room. + +“You are so queer,” he said, frankly puzzled, “and Tiger Lily is just +the same. There is something she wants to be to me, but she says it is +not my mother.” + +“No, indeed, it is not,” Wendy replied with frightful emphasis. Now we +know why she was prejudiced against the redskins. + +“Then what is it?” + +“It isn't for a lady to tell.” + +“Oh, very well,” Peter said, a little nettled. “Perhaps Tinker Bell will +tell me.” + +“Oh yes, Tinker Bell will tell you,” Wendy retorted scornfully. “She is +an abandoned little creature.” + +Here Tink, who was in her bedroom, eavesdropping, squeaked out something +impudent. + +“She says she glories in being abandoned,” Peter interpreted. + +He had a sudden idea. “Perhaps Tink wants to be my mother?” + +“You silly ass!” cried Tinker Bell in a passion. + +She had said it so often that Wendy needed no translation. + +“I almost agree with her,” Wendy snapped. Fancy Wendy snapping! But she +had been much tried, and she little knew what was to happen before the +night was out. If she had known she would not have snapped. + +None of them knew. Perhaps it was best not to know. Their ignorance +gave them one more glad hour; and as it was to be their last hour on the +island, let us rejoice that there were sixty glad minutes in it. They +sang and danced in their night-gowns. Such a deliciously creepy song +it was, in which they pretended to be frightened at their own shadows, +little witting that so soon shadows would close in upon them, from whom +they would shrink in real fear. So uproariously gay was the dance, and +how they buffeted each other on the bed and out of it! It was a pillow +fight rather than a dance, and when it was finished, the pillows +insisted on one bout more, like partners who know that they may never +meet again. The stories they told, before it was time for Wendy's +good-night story! Even Slightly tried to tell a story that night, but +the beginning was so fearfully dull that it appalled not only the others +but himself, and he said gloomily: + +“Yes, it is a dull beginning. I say, let us pretend that it is the end.” + +And then at last they all got into bed for Wendy's story, the story they +loved best, the story Peter hated. Usually when she began to tell this +story he left the room or put his hands over his ears; and possibly if +he had done either of those things this time they might all still be on +the island. But to-night he remained on his stool; and we shall see what +happened. + + + + +Chapter 11 WENDY'S STORY + +“Listen, then,” said Wendy, settling down to her story, with Michael at +her feet and seven boys in the bed. “There was once a gentleman--” + +“I had rather he had been a lady,” Curly said. + +“I wish he had been a white rat,” said Nibs. + +“Quiet,” their mother admonished [cautioned] them. “There was a lady +also, and--” + +“Oh, mummy,” cried the first twin, “you mean that there is a lady also, +don't you? She is not dead, is she?” + +“Oh, no.” + +“I am awfully glad she isn't dead,” said Tootles. “Are you glad, John?” + +“Of course I am.” + +“Are you glad, Nibs?” + +“Rather.” + +“Are you glad, Twins?” + +“We are glad.” + +“Oh dear,” sighed Wendy. + +“Little less noise there,” Peter called out, determined that she should +have fair play, however beastly a story it might be in his opinion. + +“The gentleman's name,” Wendy continued, “was Mr. Darling, and her name +was Mrs. Darling.” + +“I knew them,” John said, to annoy the others. + +“I think I knew them,” said Michael rather doubtfully. + +“They were married, you know,” explained Wendy, “and what do you think +they had?” + +“White rats,” cried Nibs, inspired. + +“No.” + +“It's awfully puzzling,” said Tootles, who knew the story by heart. + +“Quiet, Tootles. They had three descendants.” + +“What is descendants?” + +“Well, you are one, Twin.” + +“Did you hear that, John? I am a descendant.” + +“Descendants are only children,” said John. + +“Oh dear, oh dear,” sighed Wendy. “Now these three children had a +faithful nurse called Nana; but Mr. Darling was angry with her and +chained her up in the yard, and so all the children flew away.” + +“It's an awfully good story,” said Nibs. + +“They flew away,” Wendy continued, “to the Neverland, where the lost +children are.” + +“I just thought they did,” Curly broke in excitedly. “I don't know how +it is, but I just thought they did!” + +“O Wendy,” cried Tootles, “was one of the lost children called Tootles?” + +“Yes, he was.” + +“I am in a story. Hurrah, I am in a story, Nibs.” + +“Hush. Now I want you to consider the feelings of the unhappy parents +with all their children flown away.” + +“Oo!” they all moaned, though they were not really considering the +feelings of the unhappy parents one jot. + +“Think of the empty beds!” + +“Oo!” + +“It's awfully sad,” the first twin said cheerfully. + +“I don't see how it can have a happy ending,” said the second twin. “Do +you, Nibs?” + +“I'm frightfully anxious.” + +“If you knew how great is a mother's love,” Wendy told them +triumphantly, “you would have no fear.” She had now come to the part +that Peter hated. + +“I do like a mother's love,” said Tootles, hitting Nibs with a pillow. +“Do you like a mother's love, Nibs?” + +“I do just,” said Nibs, hitting back. + +“You see,” Wendy said complacently, “our heroine knew that the mother +would always leave the window open for her children to fly back by; so +they stayed away for years and had a lovely time.” + +“Did they ever go back?” + +“Let us now,” said Wendy, bracing herself up for her finest effort, +“take a peep into the future;” and they all gave themselves the twist +that makes peeps into the future easier. “Years have rolled by, and who +is this elegant lady of uncertain age alighting at London Station?” + +“O Wendy, who is she?” cried Nibs, every bit as excited as if he didn't +know. + +“Can it be--yes--no--it is--the fair Wendy!” + +“Oh!” + +“And who are the two noble portly figures accompanying her, now grown to +man's estate? Can they be John and Michael? They are!” + +“Oh!” + +“'See, dear brothers,' says Wendy pointing upwards, 'there is the window +still standing open. Ah, now we are rewarded for our sublime faith in a +mother's love.' So up they flew to their mummy and daddy, and pen cannot +describe the happy scene, over which we draw a veil.” + +That was the story, and they were as pleased with it as the fair +narrator herself. Everything just as it should be, you see. Off we skip +like the most heartless things in the world, which is what children are, +but so attractive; and we have an entirely selfish time, and then when +we have need of special attention we nobly return for it, confident that +we shall be rewarded instead of smacked. + +So great indeed was their faith in a mother's love that they felt they +could afford to be callous for a bit longer. + +But there was one there who knew better, and when Wendy finished he +uttered a hollow groan. + +“What is it, Peter?” she cried, running to him, thinking he was ill. She +felt him solicitously, lower down than his chest. “Where is it, Peter?” + +“It isn't that kind of pain,” Peter replied darkly. + +“Then what kind is it?” + +“Wendy, you are wrong about mothers.” + +They all gathered round him in affright, so alarming was his agitation; +and with a fine candour he told them what he had hitherto concealed. + +“Long ago,” he said, “I thought like you that my mother would always +keep the window open for me, so I stayed away for moons and moons and +moons, and then flew back; but the window was barred, for mother had +forgotten all about me, and there was another little boy sleeping in my +bed.” + +I am not sure that this was true, but Peter thought it was true; and it +scared them. + +“Are you sure mothers are like that?” + +“Yes.” + +So this was the truth about mothers. The toads! + +Still it is best to be careful; and no one knows so quickly as a child +when he should give in. “Wendy, let us [let's] go home,” cried John and +Michael together. + +“Yes,” she said, clutching them. + +“Not to-night?” asked the lost boys bewildered. They knew in what they +called their hearts that one can get on quite well without a mother, and +that it is only the mothers who think you can't. + +“At once,” Wendy replied resolutely, for the horrible thought had come +to her: “Perhaps mother is in half mourning by this time.” + +This dread made her forgetful of what must be Peter's feelings, and +she said to him rather sharply, “Peter, will you make the necessary +arrangements?” + +“If you wish it,” he replied, as coolly as if she had asked him to pass +the nuts. + +Not so much as a sorry-to-lose-you between them! If she did not mind the +parting, he was going to show her, was Peter, that neither did he. + +But of course he cared very much; and he was so full of wrath against +grown-ups, who, as usual, were spoiling everything, that as soon as he +got inside his tree he breathed intentionally quick short breaths at the +rate of about five to a second. He did this because there is a saying in +the Neverland that, every time you breathe, a grown-up dies; and Peter +was killing them off vindictively as fast as possible. + +Then having given the necessary instructions to the redskins he returned +to the home, where an unworthy scene had been enacted in his absence. +Panic-stricken at the thought of losing Wendy the lost boys had advanced +upon her threateningly. + +“It will be worse than before she came,” they cried. + +“We shan't let her go.” + +“Let's keep her prisoner.” + +“Ay, chain her up.” + +In her extremity an instinct told her to which of them to turn. + +“Tootles,” she cried, “I appeal to you.” + +Was it not strange? She appealed to Tootles, quite the silliest one. + +Grandly, however, did Tootles respond. For that one moment he dropped +his silliness and spoke with dignity. + +“I am just Tootles,” he said, “and nobody minds me. But the first who +does not behave to Wendy like an English gentleman I will blood him +severely.” + +He drew back his hanger; and for that instant his sun was at noon. The +others held back uneasily. Then Peter returned, and they saw at once +that they would get no support from him. He would keep no girl in the +Neverland against her will. + +“Wendy,” he said, striding up and down, “I have asked the redskins to +guide you through the wood, as flying tires you so.” + +“Thank you, Peter.” + +“Then,” he continued, in the short sharp voice of one accustomed to be +obeyed, “Tinker Bell will take you across the sea. Wake her, Nibs.” + +Nibs had to knock twice before he got an answer, though Tink had really +been sitting up in bed listening for some time. + +“Who are you? How dare you? Go away,” she cried. + +“You are to get up, Tink,” Nibs called, “and take Wendy on a journey.” + +Of course Tink had been delighted to hear that Wendy was going; but +she was jolly well determined not to be her courier, and she said so in +still more offensive language. Then she pretended to be asleep again. + +“She says she won't!” Nibs exclaimed, aghast at such insubordination, +whereupon Peter went sternly toward the young lady's chamber. + +“Tink,” he rapped out, “if you don't get up and dress at once I will +open the curtains, and then we shall all see you in your negligee +[nightgown].” + +This made her leap to the floor. “Who said I wasn't getting up?” she +cried. + +In the meantime the boys were gazing very forlornly at Wendy, now +equipped with John and Michael for the journey. By this time they were +dejected, not merely because they were about to lose her, but also +because they felt that she was going off to something nice to which they +had not been invited. Novelty was beckoning to them as usual. + +Crediting them with a nobler feeling Wendy melted. + +“Dear ones,” she said, “if you will all come with me I feel almost sure +I can get my father and mother to adopt you.” + +The invitation was meant specially for Peter, but each of the boys was +thinking exclusively of himself, and at once they jumped with joy. + +“But won't they think us rather a handful?” Nibs asked in the middle of +his jump. + +“Oh no,” said Wendy, rapidly thinking it out, “it will only mean having +a few beds in the drawing-room; they can be hidden behind the screens on +first Thursdays.” + +“Peter, can we go?” they all cried imploringly. They took it for granted +that if they went he would go also, but really they scarcely cared. Thus +children are ever ready, when novelty knocks, to desert their dearest +ones. + +“All right,” Peter replied with a bitter smile, and immediately they +rushed to get their things. + +“And now, Peter,” Wendy said, thinking she had put everything right, +“I am going to give you your medicine before you go.” She loved to give +them medicine, and undoubtedly gave them too much. Of course it was only +water, but it was out of a bottle, and she always shook the bottle and +counted the drops, which gave it a certain medicinal quality. On this +occasion, however, she did not give Peter his draught [portion], for +just as she had prepared it, she saw a look on his face that made her +heart sink. + +“Get your things, Peter,” she cried, shaking. + +“No,” he answered, pretending indifference, “I am not going with you, +Wendy.” + +“Yes, Peter.” + +“No.” + +To show that her departure would leave him unmoved, he skipped up and +down the room, playing gaily on his heartless pipes. She had to run +about after him, though it was rather undignified. + +“To find your mother,” she coaxed. + +Now, if Peter had ever quite had a mother, he no longer missed her. He +could do very well without one. He had thought them out, and remembered +only their bad points. + +“No, no,” he told Wendy decisively; “perhaps she would say I was old, +and I just want always to be a little boy and to have fun.” + +“But, Peter--” + +“No.” + +And so the others had to be told. + +“Peter isn't coming.” + +Peter not coming! They gazed blankly at him, their sticks over their +backs, and on each stick a bundle. Their first thought was that if Peter +was not going he had probably changed his mind about letting them go. + +But he was far too proud for that. “If you find your mothers,” he said +darkly, “I hope you will like them.” + +The awful cynicism of this made an uncomfortable impression, and most +of them began to look rather doubtful. After all, their faces said, were +they not noodles to want to go? + +“Now then,” cried Peter, “no fuss, no blubbering; good-bye, Wendy;” and +he held out his hand cheerily, quite as if they must really go now, for +he had something important to do. + +She had to take his hand, and there was no indication that he would +prefer a thimble. + +“You will remember about changing your flannels, Peter?” she said, +lingering over him. She was always so particular about their flannels. + +“Yes.” + +“And you will take your medicine?” + +“Yes.” + +That seemed to be everything, and an awkward pause followed. Peter, +however, was not the kind that breaks down before other people. “Are you +ready, Tinker Bell?” he called out. + +“Ay, ay.” + +“Then lead the way.” + +Tink darted up the nearest tree; but no one followed her, for it was +at this moment that the pirates made their dreadful attack upon the +redskins. Above, where all had been so still, the air was rent with +shrieks and the clash of steel. Below, there was dead silence. Mouths +opened and remained open. Wendy fell on her knees, but her arms were +extended toward Peter. All arms were extended to him, as if suddenly +blown in his direction; they were beseeching him mutely not to desert +them. As for Peter, he seized his sword, the same he thought he had +slain Barbecue with, and the lust of battle was in his eye. + + + + +Chapter 12 THE CHILDREN ARE CARRIED OFF + +The pirate attack had been a complete surprise: a sure proof that the +unscrupulous Hook had conducted it improperly, for to surprise redskins +fairly is beyond the wit of the white man. + +By all the unwritten laws of savage warfare it is always the redskin who +attacks, and with the wiliness of his race he does it just before the +dawn, at which time he knows the courage of the whites to be at its +lowest ebb. The white men have in the meantime made a rude stockade on +the summit of yonder undulating ground, at the foot of which a stream +runs, for it is destruction to be too far from water. There they await +the onslaught, the inexperienced ones clutching their revolvers and +treading on twigs, but the old hands sleeping tranquilly until just +before the dawn. Through the long black night the savage scouts wriggle, +snake-like, among the grass without stirring a blade. The brushwood +closes behind them, as silently as sand into which a mole has dived. +Not a sound is to be heard, save when they give vent to a wonderful +imitation of the lonely call of the coyote. The cry is answered by other +braves; and some of them do it even better than the coyotes, who are not +very good at it. So the chill hours wear on, and the long suspense is +horribly trying to the paleface who has to live through it for the first +time; but to the trained hand those ghastly calls and still ghastlier +silences are but an intimation of how the night is marching. + +That this was the usual procedure was so well known to Hook that in +disregarding it he cannot be excused on the plea of ignorance. + +The Piccaninnies, on their part, trusted implicitly to his honour, and +their whole action of the night stands out in marked contrast to his. +They left nothing undone that was consistent with the reputation of +their tribe. With that alertness of the senses which is at once the +marvel and despair of civilised peoples, they knew that the pirates were +on the island from the moment one of them trod on a dry stick; and in +an incredibly short space of time the coyote cries began. Every foot of +ground between the spot where Hook had landed his forces and the +home under the trees was stealthily examined by braves wearing their +mocassins with the heels in front. They found only one hillock with a +stream at its base, so that Hook had no choice; here he must establish +himself and wait for just before the dawn. Everything being thus mapped +out with almost diabolical cunning, the main body of the redskins folded +their blankets around them, and in the phlegmatic manner that is to +them, the pearl of manhood squatted above the children's home, awaiting +the cold moment when they should deal pale death. + +Here dreaming, though wide-awake, of the exquisite tortures to which +they were to put him at break of day, those confiding savages were found +by the treacherous Hook. From the accounts afterwards supplied by such +of the scouts as escaped the carnage, he does not seem even to have +paused at the rising ground, though it is certain that in that grey +light he must have seen it: no thought of waiting to be attacked appears +from first to last to have visited his subtle mind; he would not even +hold off till the night was nearly spent; on he pounded with no policy +but to fall to [get into combat]. What could the bewildered scouts do, +masters as they were of every war-like artifice save this one, but trot +helplessly after him, exposing themselves fatally to view, while they +gave pathetic utterance to the coyote cry. + +Around the brave Tiger Lily were a dozen of her stoutest warriors, and +they suddenly saw the perfidious pirates bearing down upon them. Fell +from their eyes then the film through which they had looked at +victory. No more would they torture at the stake. For them the happy +hunting-grounds was now. They knew it; but as their father's sons they +acquitted themselves. Even then they had time to gather in a phalanx +[dense formation] that would have been hard to break had they risen +quickly, but this they were forbidden to do by the traditions of their +race. It is written that the noble savage must never express surprise in +the presence of the white. Thus terrible as the sudden appearance of the +pirates must have been to them, they remained stationary for a moment, +not a muscle moving; as if the foe had come by invitation. Then, indeed, +the tradition gallantly upheld, they seized their weapons, and the air +was torn with the war-cry; but it was now too late. + +It is no part of ours to describe what was a massacre rather than a +fight. Thus perished many of the flower of the Piccaninny tribe. Not all +unavenged did they die, for with Lean Wolf fell Alf Mason, to disturb +the Spanish Main no more, and among others who bit the dust were Geo. +Scourie, Chas. Turley, and the Alsatian Foggerty. Turley fell to the +tomahawk of the terrible Panther, who ultimately cut a way through the +pirates with Tiger Lily and a small remnant of the tribe. + +To what extent Hook is to blame for his tactics on this occasion is for +the historian to decide. Had he waited on the rising ground till the +proper hour he and his men would probably have been butchered; and in +judging him it is only fair to take this into account. What he should +perhaps have done was to acquaint his opponents that he proposed to +follow a new method. On the other hand, this, as destroying the element +of surprise, would have made his strategy of no avail, so that the whole +question is beset with difficulties. One cannot at least withhold a +reluctant admiration for the wit that had conceived so bold a scheme, +and the fell [deadly] genius with which it was carried out. + +What were his own feelings about himself at that triumphant moment? +Fain [gladly] would his dogs have known, as breathing heavily and wiping +their cutlasses, they gathered at a discreet distance from his hook, and +squinted through their ferret eyes at this extraordinary man. Elation +must have been in his heart, but his face did not reflect it: ever a +dark and solitary enigma, he stood aloof from his followers in spirit as +in substance. + +The night's work was not yet over, for it was not the redskins he had +come out to destroy; they were but the bees to be smoked, so that he +should get at the honey. It was Pan he wanted, Pan and Wendy and their +band, but chiefly Pan. + +Peter was such a small boy that one tends to wonder at the man's hatred +of him. True he had flung Hook's arm to the crocodile, but even this +and the increased insecurity of life to which it led, owing to +the crocodile's pertinacity [persistance], hardly account for a +vindictiveness so relentless and malignant. The truth is that there was +a something about Peter which goaded the pirate captain to frenzy. It +was not his courage, it was not his engaging appearance, it was not--. +There is no beating about the bush, for we know quite well what it was, +and have got to tell. It was Peter's cockiness. + +This had got on Hook's nerves; it made his iron claw twitch, and at +night it disturbed him like an insect. While Peter lived, the tortured +man felt that he was a lion in a cage into which a sparrow had come. + +The question now was how to get down the trees, or how to get his dogs +down? He ran his greedy eyes over them, searching for the thinnest +ones. They wriggled uncomfortably, for they knew he would not scruple +[hesitate] to ram them down with poles. + +In the meantime, what of the boys? We have seen them at the first clang +of the weapons, turned as it were into stone figures, open-mouthed, +all appealing with outstretched arms to Peter; and we return to them as +their mouths close, and their arms fall to their sides. The pandemonium +above has ceased almost as suddenly as it arose, passed like a fierce +gust of wind; but they know that in the passing it has determined their +fate. + +Which side had won? + +The pirates, listening avidly at the mouths of the trees, heard the +question put by every boy, and alas, they also heard Peter's answer. + +“If the redskins have won,” he said, “they will beat the tom-tom; it is +always their sign of victory.” + +Now Smee had found the tom-tom, and was at that moment sitting on it. +“You will never hear the tom-tom again,” he muttered, but inaudibly of +course, for strict silence had been enjoined [urged]. To his amazement +Hook signed him to beat the tom-tom, and slowly there came to Smee an +understanding of the dreadful wickedness of the order. Never, probably, +had this simple man admired Hook so much. + +Twice Smee beat upon the instrument, and then stopped to listen +gleefully. + +“The tom-tom,” the miscreants heard Peter cry; “an Indian victory!” + +The doomed children answered with a cheer that was music to the black +hearts above, and almost immediately they repeated their good-byes +to Peter. This puzzled the pirates, but all their other feelings were +swallowed by a base delight that the enemy were about to come up the +trees. They smirked at each other and rubbed their hands. Rapidly and +silently Hook gave his orders: one man to each tree, and the others to +arrange themselves in a line two yards apart. + + + + +Chapter 13 DO YOU BELIEVE IN FAIRIES? + +The more quickly this horror is disposed of the better. The first to +emerge from his tree was Curly. He rose out of it into the arms of +Cecco, who flung him to Smee, who flung him to Starkey, who flung him to +Bill Jukes, who flung him to Noodler, and so he was tossed from one to +another till he fell at the feet of the black pirate. All the boys were +plucked from their trees in this ruthless manner; and several of them +were in the air at a time, like bales of goods flung from hand to hand. + +A different treatment was accorded to Wendy, who came last. With +ironical politeness Hook raised his hat to her, and, offering her his +arm, escorted her to the spot where the others were being gagged. He +did it with such an air, he was so frightfully DISTINGUE [imposingly +distinguished], that she was too fascinated to cry out. She was only a +little girl. + +Perhaps it is tell-tale to divulge that for a moment Hook entranced her, +and we tell on her only because her slip led to strange results. Had she +haughtily unhanded him (and we should have loved to write it of her), +she would have been hurled through the air like the others, and then +Hook would probably not have been present at the tying of the children; +and had he not been at the tying he would not have discovered Slightly's +secret, and without the secret he could not presently have made his foul +attempt on Peter's life. + +They were tied to prevent their flying away, doubled up with their knees +close to their ears; and for the trussing of them the black pirate had +cut a rope into nine equal pieces. All went well until Slightly's turn +came, when he was found to be like those irritating parcels that use up +all the string in going round and leave no tags [ends] with which to +tie a knot. The pirates kicked him in their rage, just as you kick the +parcel (though in fairness you should kick the string); and strange +to say it was Hook who told them to belay their violence. His lip was +curled with malicious triumph. While his dogs were merely sweating +because every time they tried to pack the unhappy lad tight in one +part he bulged out in another, Hook's master mind had gone far beneath +Slightly's surface, probing not for effects but for causes; and his +exultation showed that he had found them. Slightly, white to the gills, +knew that Hook had surprised [discovered] his secret, which was this, +that no boy so blown out could use a tree wherein an average man need +stick. Poor Slightly, most wretched of all the children now, for he +was in a panic about Peter, bitterly regretted what he had done. Madly +addicted to the drinking of water when he was hot, he had swelled in +consequence to his present girth, and instead of reducing himself to fit +his tree he had, unknown to the others, whittled his tree to make it fit +him. + +Sufficient of this Hook guessed to persuade him that Peter at last lay +at his mercy, but no word of the dark design that now formed in the +subterranean caverns of his mind crossed his lips; he merely signed +that the captives were to be conveyed to the ship, and that he would be +alone. + +How to convey them? Hunched up in their ropes they might indeed be +rolled down hill like barrels, but most of the way lay through a morass. +Again Hook's genius surmounted difficulties. He indicated that the +little house must be used as a conveyance. The children were flung into +it, four stout pirates raised it on their shoulders, the others fell in +behind, and singing the hateful pirate chorus the strange procession +set off through the wood. I don't know whether any of the children were +crying; if so, the singing drowned the sound; but as the little house +disappeared in the forest, a brave though tiny jet of smoke issued from +its chimney as if defying Hook. + +Hook saw it, and it did Peter a bad service. It dried up any trickle of +pity for him that may have remained in the pirate's infuriated breast. + +The first thing he did on finding himself alone in the fast falling +night was to tiptoe to Slightly's tree, and make sure that it provided +him with a passage. Then for long he remained brooding; his hat of ill +omen on the sward, so that any gentle breeze which had arisen might play +refreshingly through his hair. Dark as were his thoughts his blue eyes +were as soft as the periwinkle. Intently he listened for any sound from +the nether world, but all was as silent below as above; the house under +the ground seemed to be but one more empty tenement in the void. Was +that boy asleep, or did he stand waiting at the foot of Slightly's tree, +with his dagger in his hand? + +There was no way of knowing, save by going down. Hook let his cloak slip +softly to the ground, and then biting his lips till a lewd blood stood +on them, he stepped into the tree. He was a brave man, but for a moment +he had to stop there and wipe his brow, which was dripping like a +candle. Then, silently, he let himself go into the unknown. + +He arrived unmolested at the foot of the shaft, and stood still again, +biting at his breath, which had almost left him. As his eyes became +accustomed to the dim light various objects in the home under the trees +took shape; but the only one on which his greedy gaze rested, long +sought for and found at last, was the great bed. On the bed lay Peter +fast asleep. + +Unaware of the tragedy being enacted above, Peter had continued, for +a little time after the children left, to play gaily on his pipes: no +doubt rather a forlorn attempt to prove to himself that he did not care. +Then he decided not to take his medicine, so as to grieve Wendy. Then he +lay down on the bed outside the coverlet, to vex her still more; for she +had always tucked them inside it, because you never know that you may +not grow chilly at the turn of the night. Then he nearly cried; but +it struck him how indignant she would be if he laughed instead; so he +laughed a haughty laugh and fell asleep in the middle of it. + +Sometimes, though not often, he had dreams, and they were more painful +than the dreams of other boys. For hours he could not be separated from +these dreams, though he wailed piteously in them. They had to do, I +think, with the riddle of his existence. At such times it had been +Wendy's custom to take him out of bed and sit with him on her lap, +soothing him in dear ways of her own invention, and when he grew calmer +to put him back to bed before he quite woke up, so that he should +not know of the indignity to which she had subjected him. But on this +occasion he had fallen at once into a dreamless sleep. One arm dropped +over the edge of the bed, one leg was arched, and the unfinished part of +his laugh was stranded on his mouth, which was open, showing the little +pearls. + +Thus defenceless Hook found him. He stood silent at the foot of the tree +looking across the chamber at his enemy. Did no feeling of compassion +disturb his sombre breast? The man was not wholly evil; he loved flowers +(I have been told) and sweet music (he was himself no mean performer on +the harpsichord); and, let it be frankly admitted, the idyllic nature of +the scene stirred him profoundly. Mastered by his better self he would +have returned reluctantly up the tree, but for one thing. + +What stayed him was Peter's impertinent appearance as he slept. The +open mouth, the drooping arm, the arched knee: they were such a +personification of cockiness as, taken together, will never again, one +may hope, be presented to eyes so sensitive to their offensiveness. They +steeled Hook's heart. If his rage had broken him into a hundred pieces +every one of them would have disregarded the incident, and leapt at the +sleeper. + +Though a light from the one lamp shone dimly on the bed, Hook stood in +darkness himself, and at the first stealthy step forward he discovered +an obstacle, the door of Slightly's tree. It did not entirely fill the +aperture, and he had been looking over it. Feeling for the catch, +he found to his fury that it was low down, beyond his reach. To his +disordered brain it seemed then that the irritating quality in Peter's +face and figure visibly increased, and he rattled the door and flung +himself against it. Was his enemy to escape him after all? + +But what was that? The red in his eye had caught sight of Peter's +medicine standing on a ledge within easy reach. He fathomed what it was +straightaway, and immediately knew that the sleeper was in his power. + +Lest he should be taken alive, Hook always carried about his person a +dreadful drug, blended by himself of all the death-dealing rings that +had come into his possession. These he had boiled down into a yellow +liquid quite unknown to science, which was probably the most virulent +poison in existence. + +Five drops of this he now added to Peter's cup. His hand shook, but it +was in exultation rather than in shame. As he did it he avoided glancing +at the sleeper, but not lest pity should unnerve him; merely to avoid +spilling. Then one long gloating look he cast upon his victim, and +turning, wormed his way with difficulty up the tree. As he emerged +at the top he looked the very spirit of evil breaking from its hole. +Donning his hat at its most rakish angle, he wound his cloak around him, +holding one end in front as if to conceal his person from the night, +of which it was the blackest part, and muttering strangely to himself, +stole away through the trees. + +Peter slept on. The light guttered [burned to edges] and went out, +leaving the tenement in darkness; but still he slept. It must have been +not less than ten o'clock by the crocodile, when he suddenly sat up in +his bed, wakened by he knew not what. It was a soft cautious tapping on +the door of his tree. + +Soft and cautious, but in that stillness it was sinister. Peter felt for +his dagger till his hand gripped it. Then he spoke. + +“Who is that?” + +For long there was no answer: then again the knock. + +“Who are you?” + +No answer. + +He was thrilled, and he loved being thrilled. In two strides he reached +the door. Unlike Slightly's door, it filled the aperture [opening], so +that he could not see beyond it, nor could the one knocking see him. + +“I won't open unless you speak,” Peter cried. + +Then at last the visitor spoke, in a lovely bell-like voice. + +“Let me in, Peter.” + +It was Tink, and quickly he unbarred to her. She flew in excitedly, her +face flushed and her dress stained with mud. + +“What is it?” + +“Oh, you could never guess!” she cried, and offered him three guesses. +“Out with it!” he shouted, and in one ungrammatical sentence, as long as +the ribbons that conjurers [magicians] pull from their mouths, she told +of the capture of Wendy and the boys. + +Peter's heart bobbed up and down as he listened. Wendy bound, and on the +pirate ship; she who loved everything to be just so! + +“I'll rescue her!” he cried, leaping at his weapons. As he leapt he +thought of something he could do to please her. He could take his +medicine. + +His hand closed on the fatal draught. + +“No!” shrieked Tinker Bell, who had heard Hook mutter about his deed as +he sped through the forest. + +“Why not?” + +“It is poisoned.” + +“Poisoned? Who could have poisoned it?” + +“Hook.” + +“Don't be silly. How could Hook have got down here?” + +Alas, Tinker Bell could not explain this, for even she did not know the +dark secret of Slightly's tree. Nevertheless Hook's words had left no +room for doubt. The cup was poisoned. + +“Besides,” said Peter, quite believing himself, “I never fell asleep.” + +He raised the cup. No time for words now; time for deeds; and with one +of her lightning movements Tink got between his lips and the draught, +and drained it to the dregs. + +“Why, Tink, how dare you drink my medicine?” + +But she did not answer. Already she was reeling in the air. + +“What is the matter with you?” cried Peter, suddenly afraid. + +“It was poisoned, Peter,” she told him softly; “and now I am going to be +dead.” + +“O Tink, did you drink it to save me?” + +“Yes.” + +“But why, Tink?” + +Her wings would scarcely carry her now, but in reply she alighted on his +shoulder and gave his nose a loving bite. She whispered in his ear “You +silly ass,” and then, tottering to her chamber, lay down on the bed. + +His head almost filled the fourth wall of her little room as he knelt +near her in distress. Every moment her light was growing fainter; and +he knew that if it went out she would be no more. She liked his tears so +much that she put out her beautiful finger and let them run over it. + +Her voice was so low that at first he could not make out what she said. +Then he made it out. She was saying that she thought she could get well +again if children believed in fairies. + +Peter flung out his arms. There were no children there, and it was night +time; but he addressed all who might be dreaming of the Neverland, and +who were therefore nearer to him than you think: boys and girls in their +nighties, and naked papooses in their baskets hung from trees. + +“Do you believe?” he cried. + +Tink sat up in bed almost briskly to listen to her fate. + +She fancied she heard answers in the affirmative, and then again she +wasn't sure. + +“What do you think?” she asked Peter. + +“If you believe,” he shouted to them, “clap your hands; don't let Tink +die.” + +Many clapped. + +Some didn't. + +A few beasts hissed. + +The clapping stopped suddenly; as if countless mothers had rushed to +their nurseries to see what on earth was happening; but already Tink was +saved. First her voice grew strong, then she popped out of bed, then +she was flashing through the room more merry and impudent than ever. She +never thought of thanking those who believed, but she would have liked to +get at the ones who had hissed. + +“And now to rescue Wendy!” + +The moon was riding in a cloudy heaven when Peter rose from his tree, +begirt [belted] with weapons and wearing little else, to set out upon +his perilous quest. It was not such a night as he would have chosen. +He had hoped to fly, keeping not far from the ground so that nothing +unwonted should escape his eyes; but in that fitful light to have +flown low would have meant trailing his shadow through the trees, thus +disturbing birds and acquainting a watchful foe that he was astir. + +He regretted now that he had given the birds of the island such strange +names that they are very wild and difficult of approach. + +There was no other course but to press forward in redskin fashion, at +which happily he was an adept [expert]. But in what direction, for he +could not be sure that the children had been taken to the ship? A +light fall of snow had obliterated all footmarks; and a deathly silence +pervaded the island, as if for a space Nature stood still in horror of +the recent carnage. He had taught the children something of the forest +lore that he had himself learned from Tiger Lily and Tinker Bell, +and knew that in their dire hour they were not likely to forget it. +Slightly, if he had an opportunity, would blaze [cut a mark in] the +trees, for instance, Curly would drop seeds, and Wendy would leave her +handkerchief at some important place. The morning was needed to search +for such guidance, and he could not wait. The upper world had called +him, but would give no help. + +The crocodile passed him, but not another living thing, not a sound, not +a movement; and yet he knew well that sudden death might be at the next +tree, or stalking him from behind. + +He swore this terrible oath: “Hook or me this time.” + +Now he crawled forward like a snake, and again erect, he darted across +a space on which the moonlight played, one finger on his lip and his +dagger at the ready. He was frightfully happy. + + + + +Chapter 14 THE PIRATE SHIP + +One green light squinting over Kidd's Creek, which is near the mouth of +the pirate river, marked where the brig, the JOLLY ROGER, lay, low in +the water; a rakish-looking [speedy-looking] craft foul to the hull, +every beam in her detestable, like ground strewn with mangled feathers. +She was the cannibal of the seas, and scarce needed that watchful eye, +for she floated immune in the horror of her name. + +She was wrapped in the blanket of night, through which no sound from her +could have reached the shore. There was little sound, and none agreeable +save the whir of the ship's sewing machine at which Smee sat, ever +industrious and obliging, the essence of the commonplace, pathetic Smee. +I know not why he was so infinitely pathetic, unless it were because +he was so pathetically unaware of it; but even strong men had to turn +hastily from looking at him, and more than once on summer evenings he +had touched the fount of Hook's tears and made it flow. Of this, as of +almost everything else, Smee was quite unconscious. + +A few of the pirates leant over the bulwarks, drinking in the miasma +[putrid mist] of the night; others sprawled by barrels over games of +dice and cards; and the exhausted four who had carried the little house +lay prone on the deck, where even in their sleep they rolled skillfully +to this side or that out of Hook's reach, lest he should claw them +mechanically in passing. + +Hook trod the deck in thought. O man unfathomable. It was his hour of +triumph. Peter had been removed for ever from his path, and all the +other boys were in the brig, about to walk the plank. It was his +grimmest deed since the days when he had brought Barbecue to heel; and +knowing as we do how vain a tabernacle is man, could we be surprised +had he now paced the deck unsteadily, bellied out by the winds of his +success? + +But there was no elation in his gait, which kept pace with the action of +his sombre mind. Hook was profoundly dejected. + +He was often thus when communing with himself on board ship in the +quietude of the night. It was because he was so terribly alone. This +inscrutable man never felt more alone than when surrounded by his dogs. +They were socially inferior to him. + +Hook was not his true name. To reveal who he really was would even at +this date set the country in a blaze; but as those who read between the +lines must already have guessed, he had been at a famous public school; +and its traditions still clung to him like garments, with which indeed +they are largely concerned. Thus it was offensive to him even now to +board a ship in the same dress in which he grappled [attacked] her, and +he still adhered in his walk to the school's distinguished slouch. But +above all he retained the passion for good form. + +Good form! However much he may have degenerated, he still knew that this +is all that really matters. + +From far within him he heard a creaking as of rusty portals, and through +them came a stern tap-tap-tap, like hammering in the night when one +cannot sleep. “Have you been good form to-day?” was their eternal +question. + +“Fame, fame, that glittering bauble, it is mine,” he cried. + +“Is it quite good form to be distinguished at anything?” the tap-tap +from his school replied. + +“I am the only man whom Barbecue feared,” he urged, “and Flint feared +Barbecue.” + +“Barbecue, Flint--what house?” came the cutting retort. + +Most disquieting reflection of all, was it not bad form to think about +good form? + +His vitals were tortured by this problem. It was a claw within him +sharper than the iron one; and as it tore him, the perspiration dripped +down his tallow [waxy] countenance and streaked his doublet. Ofttimes he +drew his sleeve across his face, but there was no damming that trickle. + +Ah, envy not Hook. + +There came to him a presentiment of his early dissolution [death]. It +was as if Peter's terrible oath had boarded the ship. Hook felt a gloomy +desire to make his dying speech, lest presently there should be no time +for it. + +“Better for Hook,” he cried, “if he had had less ambition!” It was in +his darkest hours only that he referred to himself in the third person. + +“No little children to love me!” + +Strange that he should think of this, which had never troubled him +before; perhaps the sewing machine brought it to his mind. For long he +muttered to himself, staring at Smee, who was hemming placidly, under +the conviction that all children feared him. + +Feared him! Feared Smee! There was not a child on board the brig that +night who did not already love him. He had said horrid things to them +and hit them with the palm of his hand, because he could not hit with +his fist, but they had only clung to him the more. Michael had tried on +his spectacles. + +To tell poor Smee that they thought him lovable! Hook itched to do it, +but it seemed too brutal. Instead, he revolved this mystery in his +mind: why do they find Smee lovable? He pursued the problem like the +sleuth-hound that he was. If Smee was lovable, what was it that made him +so? A terrible answer suddenly presented itself--“Good form?” + +Had the bo'sun good form without knowing it, which is the best form of +all? + +He remembered that you have to prove you don't know you have it before +you are eligible for Pop [an elite social club at Eton]. + +With a cry of rage he raised his iron hand over Smee's head; but he did +not tear. What arrested him was this reflection: + +“To claw a man because he is good form, what would that be?” + +“Bad form!” + +The unhappy Hook was as impotent [powerless] as he was damp, and he fell +forward like a cut flower. + +His dogs thinking him out of the way for a time, discipline instantly +relaxed; and they broke into a bacchanalian [drunken] dance, which +brought him to his feet at once, all traces of human weakness gone, as +if a bucket of water had passed over him. + +“Quiet, you scugs,” he cried, “or I'll cast anchor in you;” and at once +the din was hushed. “Are all the children chained, so that they cannot +fly away?” + +“Ay, ay.” + +“Then hoist them up.” + +The wretched prisoners were dragged from the hold, all except Wendy, +and ranged in line in front of him. For a time he seemed unconscious +of their presence. He lolled at his ease, humming, not unmelodiously, +snatches of a rude song, and fingering a pack of cards. Ever and anon +the light from his cigar gave a touch of colour to his face. + +“Now then, bullies,” he said briskly, “six of you walk the plank +to-night, but I have room for two cabin boys. Which of you is it to be?” + +“Don't irritate him unnecessarily,” had been Wendy's instructions in +the hold; so Tootles stepped forward politely. Tootles hated the idea +of signing under such a man, but an instinct told him that it would +be prudent to lay the responsibility on an absent person; and though a +somewhat silly boy, he knew that mothers alone are always willing to be +the buffer. All children know this about mothers, and despise them for +it, but make constant use of it. + +So Tootles explained prudently, “You see, sir, I don't think my mother +would like me to be a pirate. Would your mother like you to be a pirate, +Slightly?” + +He winked at Slightly, who said mournfully, “I don't think so,” as if +he wished things had been otherwise. “Would your mother like you to be a +pirate, Twin?” + +“I don't think so,” said the first twin, as clever as the others. “Nibs, +would--” + +“Stow this gab,” roared Hook, and the spokesmen were dragged back. “You, +boy,” he said, addressing John, “you look as if you had a little pluck +in you. Didst never want to be a pirate, my hearty?” + +Now John had sometimes experienced this hankering at maths. prep.; and +he was struck by Hook's picking him out. + +“I once thought of calling myself Red-handed Jack,” he said diffidently. + +“And a good name too. We'll call you that here, bully, if you join.” + +“What do you think, Michael?” asked John. + +“What would you call me if I join?” Michael demanded. + +“Blackbeard Joe.” + +Michael was naturally impressed. “What do you think, John?” He wanted +John to decide, and John wanted him to decide. + +“Shall we still be respectful subjects of the King?” John inquired. + +Through Hook's teeth came the answer: “You would have to swear, 'Down +with the King.'” + +Perhaps John had not behaved very well so far, but he shone out now. + +“Then I refuse,” he cried, banging the barrel in front of Hook. + +“And I refuse,” cried Michael. + +“Rule Britannia!” squeaked Curly. + +The infuriated pirates buffeted them in the mouth; and Hook roared out, +“That seals your doom. Bring up their mother. Get the plank ready.” + +They were only boys, and they went white as they saw Jukes and Cecco +preparing the fatal plank. But they tried to look brave when Wendy was +brought up. + +No words of mine can tell you how Wendy despised those pirates. To the +boys there was at least some glamour in the pirate calling; but all that +she saw was that the ship had not been tidied for years. There was not +a porthole on the grimy glass of which you might not have written with +your finger “Dirty pig”; and she had already written it on several. But +as the boys gathered round her she had no thought, of course, save for +them. + +“So, my beauty,” said Hook, as if he spoke in syrup, “you are to see +your children walk the plank.” + +Fine gentlemen though he was, the intensity of his communings had soiled +his ruff, and suddenly he knew that she was gazing at it. With a hasty +gesture he tried to hide it, but he was too late. + +“Are they to die?” asked Wendy, with a look of such frightful contempt +that he nearly fainted. + +“They are,” he snarled. “Silence all,” he called gloatingly, “for a +mother's last words to her children.” + +At this moment Wendy was grand. “These are my last words, dear boys,” + she said firmly. “I feel that I have a message to you from your real +mothers, and it is this: 'We hope our sons will die like English +gentlemen.'” + +Even the pirates were awed, and Tootles cried out hysterically, “I am +going to do what my mother hopes. What are you to do, Nibs?” + +“What my mother hopes. What are you to do, Twin?” + +“What my mother hopes. John, what are--” + +But Hook had found his voice again. + +“Tie her up!” he shouted. + +It was Smee who tied her to the mast. “See here, honey,” he whispered, +“I'll save you if you promise to be my mother.” + +But not even for Smee would she make such a promise. “I would almost +rather have no children at all,” she said disdainfully [scornfully]. + +It is sad to know that not a boy was looking at her as Smee tied her to +the mast; the eyes of all were on the plank: that last little walk they +were about to take. They were no longer able to hope that they would +walk it manfully, for the capacity to think had gone from them; they +could stare and shiver only. + +Hook smiled on them with his teeth closed, and took a step toward Wendy. +His intention was to turn her face so that she should see the boys +walking the plank one by one. But he never reached her, he never heard +the cry of anguish he hoped to wring from her. He heard something else +instead. + +It was the terrible tick-tick of the crocodile. + +They all heard it--pirates, boys, Wendy; and immediately every head was +blown in one direction; not to the water whence the sound proceeded, but +toward Hook. All knew that what was about to happen concerned him alone, +and that from being actors they were suddenly become spectators. + +Very frightful was it to see the change that came over him. It was as if +he had been clipped at every joint. He fell in a little heap. + +The sound came steadily nearer; and in advance of it came this ghastly +thought, “The crocodile is about to board the ship!” + +Even the iron claw hung inactive; as if knowing that it was no intrinsic +part of what the attacking force wanted. Left so fearfully alone, any +other man would have lain with his eyes shut where he fell: but the +gigantic brain of Hook was still working, and under its guidance he +crawled on the knees along the deck as far from the sound as he could +go. The pirates respectfully cleared a passage for him, and it was only +when he brought up against the bulwarks that he spoke. + +“Hide me!” he cried hoarsely. + +They gathered round him, all eyes averted from the thing that was coming +aboard. They had no thought of fighting it. It was Fate. + +Only when Hook was hidden from them did curiosity loosen the limbs of +the boys so that they could rush to the ship's side to see the crocodile +climbing it. Then they got the strangest surprise of the Night of +Nights; for it was no crocodile that was coming to their aid. It was +Peter. + +He signed to them not to give vent to any cry of admiration that might +rouse suspicion. Then he went on ticking. + + + + +Chapter 15 “HOOK OR ME THIS TIME” + +Odd things happen to all of us on our way through life without our +noticing for a time that they have happened. Thus, to take an instance, +we suddenly discover that we have been deaf in one ear for we don't know +how long, but, say, half an hour. Now such an experience had come that +night to Peter. When last we saw him he was stealing across the island +with one finger to his lips and his dagger at the ready. He had seen the +crocodile pass by without noticing anything peculiar about it, but by +and by he remembered that it had not been ticking. At first he thought +this eerie, but soon concluded rightly that the clock had run down. + +Without giving a thought to what might be the feelings of a +fellow-creature thus abruptly deprived of its closest companion, Peter +began to consider how he could turn the catastrophe to his own use; +and he decided to tick, so that wild beasts should believe he was the +crocodile and let him pass unmolested. He ticked superbly, but with one +unforeseen result. The crocodile was among those who heard the sound, +and it followed him, though whether with the purpose of regaining what +it had lost, or merely as a friend under the belief that it was again +ticking itself, will never be certainly known, for, like slaves to a +fixed idea, it was a stupid beast. + +Peter reached the shore without mishap, and went straight on, his legs +encountering the water as if quite unaware that they had entered a new +element. Thus many animals pass from land to water, but no other human +of whom I know. As he swam he had but one thought: “Hook or me this +time.” He had ticked so long that he now went on ticking without knowing +that he was doing it. Had he known he would have stopped, for to board +the brig by help of the tick, though an ingenious idea, had not occurred +to him. + +On the contrary, he thought he had scaled her side as noiseless as a +mouse; and he was amazed to see the pirates cowering from him, with Hook +in their midst as abject as if he had heard the crocodile. + +The crocodile! No sooner did Peter remember it than he heard the +ticking. At first he thought the sound did come from the crocodile, +and he looked behind him swiftly. Then he realised that he was doing it +himself, and in a flash he understood the situation. “How clever of me!” + he thought at once, and signed to the boys not to burst into applause. + +It was at this moment that Ed Teynte the quartermaster emerged from the +forecastle and came along the deck. Now, reader, time what happened by +your watch. Peter struck true and deep. John clapped his hands on the +ill-fated pirate's mouth to stifle the dying groan. He fell forward. +Four boys caught him to prevent the thud. Peter gave the signal, and the +carrion was cast overboard. There was a splash, and then silence. How +long has it taken? + +“One!” (Slightly had begun to count.) + +None too soon, Peter, every inch of him on tiptoe, vanished into the +cabin; for more than one pirate was screwing up his courage to look +round. They could hear each other's distressed breathing now, which +showed them that the more terrible sound had passed. + +“It's gone, captain,” Smee said, wiping off his spectacles. “All's still +again.” + +Slowly Hook let his head emerge from his ruff, and listened so intently +that he could have caught the echo of the tick. There was not a sound, +and he drew himself up firmly to his full height. + +“Then here's to Johnny Plank!” he cried brazenly, hating the boys more +than ever because they had seen him unbend. He broke into the villainous +ditty: + + “Yo ho, yo ho, the frisky plank, + You walks along it so, + Till it goes down and you goes down + To Davy Jones below!” + +To terrorize the prisoners the more, though with a certain loss of +dignity, he danced along an imaginary plank, grimacing at them as he +sang; and when he finished he cried, “Do you want a touch of the cat [o' +nine tails] before you walk the plank?” + +At that they fell on their knees. “No, no!” they cried so piteously that +every pirate smiled. + +“Fetch the cat, Jukes,” said Hook; “it's in the cabin.” + +The cabin! Peter was in the cabin! The children gazed at each other. + +“Ay, ay,” said Jukes blithely, and he strode into the cabin. They +followed him with their eyes; they scarce knew that Hook had resumed his +song, his dogs joining in with him: + + “Yo ho, yo ho, the scratching cat, + Its tails are nine, you know, + And when they're writ upon your back--” + +What was the last line will never be known, for of a sudden the song was +stayed by a dreadful screech from the cabin. It wailed through the ship, +and died away. Then was heard a crowing sound which was well understood +by the boys, but to the pirates was almost more eerie than the screech. + +“What was that?” cried Hook. + +“Two,” said Slightly solemnly. + +The Italian Cecco hesitated for a moment and then swung into the cabin. +He tottered out, haggard. + +“What's the matter with Bill Jukes, you dog?” hissed Hook, towering over +him. + +“The matter wi' him is he's dead, stabbed,” replied Cecco in a hollow +voice. + +“Bill Jukes dead!” cried the startled pirates. + +“The cabin's as black as a pit,” Cecco said, almost gibbering, “but +there is something terrible in there: the thing you heard crowing.” + +The exultation of the boys, the lowering looks of the pirates, both were +seen by Hook. + +“Cecco,” he said in his most steely voice, “go back and fetch me out +that doodle-doo.” + +Cecco, bravest of the brave, cowered before his captain, crying “No, +no”; but Hook was purring to his claw. + +“Did you say you would go, Cecco?” he said musingly. + +Cecco went, first flinging his arms despairingly. There was no more +singing, all listened now; and again came a death-screech and again a +crow. + +No one spoke except Slightly. “Three,” he said. + +Hook rallied his dogs with a gesture. “'S'death and odds fish,” he +thundered, “who is to bring me that doodle-doo?” + +“Wait till Cecco comes out,” growled Starkey, and the others took up the +cry. + +“I think I heard you volunteer, Starkey,” said Hook, purring again. + +“No, by thunder!” Starkey cried. + +“My hook thinks you did,” said Hook, crossing to him. “I wonder if it +would not be advisable, Starkey, to humour the hook?” + +“I'll swing before I go in there,” replied Starkey doggedly, and again +he had the support of the crew. + +“Is this mutiny?” asked Hook more pleasantly than ever. “Starkey's +ringleader!” + +“Captain, mercy!” Starkey whimpered, all of a tremble now. + +“Shake hands, Starkey,” said Hook, proffering his claw. + +Starkey looked round for help, but all deserted him. As he backed up +Hook advanced, and now the red spark was in his eye. With a despairing +scream the pirate leapt upon Long Tom and precipitated himself into the +sea. + +“Four,” said Slightly. + +“And now,” Hook said courteously, “did any other gentlemen say mutiny?” + Seizing a lantern and raising his claw with a menacing gesture, “I'll +bring out that doodle-doo myself,” he said, and sped into the cabin. + +“Five.” How Slightly longed to say it. He wetted his lips to be ready, +but Hook came staggering out, without his lantern. + +“Something blew out the light,” he said a little unsteadily. + +“Something!” echoed Mullins. + +“What of Cecco?” demanded Noodler. + +“He's as dead as Jukes,” said Hook shortly. + +His reluctance to return to the cabin impressed them all unfavourably, +and the mutinous sounds again broke forth. All pirates are +superstitious, and Cookson cried, “They do say the surest sign a ship's +accurst is when there's one on board more than can be accounted for.” + +“I've heard,” muttered Mullins, “he always boards the pirate craft last. +Had he a tail, captain?” + +“They say,” said another, looking viciously at Hook, “that when he comes +it's in the likeness of the wickedest man aboard.” + +“Had he a hook, captain?” asked Cookson insolently; and one after +another took up the cry, “The ship's doomed!” At this the children could +not resist raising a cheer. Hook had well-nigh forgotten his prisoners, +but as he swung round on them now his face lit up again. + +“Lads,” he cried to his crew, “now here's a notion. Open the cabin door +and drive them in. Let them fight the doodle-doo for their lives. If +they kill him, we're so much the better; if he kills them, we're none +the worse.” + +For the last time his dogs admired Hook, and devotedly they did his +bidding. The boys, pretending to struggle, were pushed into the cabin +and the door was closed on them. + +“Now, listen!” cried Hook, and all listened. But not one dared to face +the door. Yes, one, Wendy, who all this time had been bound to the mast. +It was for neither a scream nor a crow that she was watching, it was for +the reappearance of Peter. + +She had not long to wait. In the cabin he had found the thing for which +he had gone in search: the key that would free the children of their +manacles, and now they all stole forth, armed with such weapons as they +could find. First signing them to hide, Peter cut Wendy's bonds, +and then nothing could have been easier than for them all to fly off +together; but one thing barred the way, an oath, “Hook or me this time.” + So when he had freed Wendy, he whispered for her to conceal herself with +the others, and himself took her place by the mast, her cloak around him +so that he should pass for her. Then he took a great breath and crowed. + +To the pirates it was a voice crying that all the boys lay slain in the +cabin; and they were panic-stricken. Hook tried to hearten them; but +like the dogs he had made them they showed him their fangs, and he knew +that if he took his eyes off them now they would leap at him. + +“Lads,” he said, ready to cajole or strike as need be, but never +quailing for an instant, “I've thought it out. There's a Jonah aboard.” + +“Ay,” they snarled, “a man wi' a hook.” + +“No, lads, no, it's the girl. Never was luck on a pirate ship wi' a +woman on board. We'll right the ship when she's gone.” + +Some of them remembered that this had been a saying of Flint's. “It's +worth trying,” they said doubtfully. + +“Fling the girl overboard,” cried Hook; and they made a rush at the +figure in the cloak. + +“There's none can save you now, missy,” Mullins hissed jeeringly. + +“There's one,” replied the figure. + +“Who's that?” + +“Peter Pan the avenger!” came the terrible answer; and as he spoke Peter +flung off his cloak. Then they all knew who 'twas that had been undoing +them in the cabin, and twice Hook essayed to speak and twice he failed. +In that frightful moment I think his fierce heart broke. + +At last he cried, “Cleave him to the brisket!” but without conviction. + +“Down, boys, and at them!” Peter's voice rang out; and in another moment +the clash of arms was resounding through the ship. Had the pirates kept +together it is certain that they would have won; but the onset came +when they were still unstrung, and they ran hither and thither, striking +wildly, each thinking himself the last survivor of the crew. Man to man +they were the stronger; but they fought on the defensive only, which +enabled the boys to hunt in pairs and choose their quarry. Some of the +miscreants leapt into the sea; others hid in dark recesses, where they +were found by Slightly, who did not fight, but ran about with a lantern +which he flashed in their faces, so that they were half blinded and +fell as an easy prey to the reeking swords of the other boys. There was +little sound to be heard but the clang of weapons, an occasional +screech or splash, and Slightly monotonously counting--five--six--seven +eight--nine--ten--eleven. + +I think all were gone when a group of savage boys surrounded Hook, who +seemed to have a charmed life, as he kept them at bay in that circle +of fire. They had done for his dogs, but this man alone seemed to be a +match for them all. Again and again they closed upon him, and again and +again he hewed a clear space. He had lifted up one boy with his hook, +and was using him as a buckler [shield], when another, who had just +passed his sword through Mullins, sprang into the fray. + +“Put up your swords, boys,” cried the newcomer, “this man is mine.” + +Thus suddenly Hook found himself face to face with Peter. The others +drew back and formed a ring around them. + +For long the two enemies looked at one another, Hook shuddering +slightly, and Peter with the strange smile upon his face. + +“So, Pan,” said Hook at last, “this is all your doing.” + +“Ay, James Hook,” came the stern answer, “it is all my doing.” + +“Proud and insolent youth,” said Hook, “prepare to meet thy doom.” + +“Dark and sinister man,” Peter answered, “have at thee.” + +Without more words they fell to, and for a space there was no advantage +to either blade. Peter was a superb swordsman, and parried with dazzling +rapidity; ever and anon he followed up a feint with a lunge that got +past his foe's defence, but his shorter reach stood him in ill stead, +and he could not drive the steel home. Hook, scarcely his inferior in +brilliancy, but not quite so nimble in wrist play, forced him back by +the weight of his onset, hoping suddenly to end all with a favourite +thrust, taught him long ago by Barbecue at Rio; but to his astonishment +he found this thrust turned aside again and again. Then he sought to +close and give the quietus with his iron hook, which all this time had +been pawing the air; but Peter doubled under it and, lunging fiercely, +pierced him in the ribs. At the sight of his own blood, whose peculiar +colour, you remember, was offensive to him, the sword fell from Hook's +hand, and he was at Peter's mercy. + +“Now!” cried all the boys, but with a magnificent gesture Peter invited +his opponent to pick up his sword. Hook did so instantly, but with a +tragic feeling that Peter was showing good form. + +Hitherto he had thought it was some fiend fighting him, but darker +suspicions assailed him now. + +“Pan, who and what art thou?” he cried huskily. + +“I'm youth, I'm joy,” Peter answered at a venture, “I'm a little bird +that has broken out of the egg.” + +This, of course, was nonsense; but it was proof to the unhappy Hook that +Peter did not know in the least who or what he was, which is the very +pinnacle of good form. + +“To't again,” he cried despairingly. + +He fought now like a human flail, and every sweep of that terrible sword +would have severed in twain any man or boy who obstructed it; but Peter +fluttered round him as if the very wind it made blew him out of the +danger zone. And again and again he darted in and pricked. + +Hook was fighting now without hope. That passionate breast no longer +asked for life; but for one boon it craved: to see Peter show bad form +before it was cold forever. + +Abandoning the fight he rushed into the powder magazine and fired it. + +“In two minutes,” he cried, “the ship will be blown to pieces.” + +Now, now, he thought, true form will show. + +But Peter issued from the powder magazine with the shell in his hands, +and calmly flung it overboard. + +What sort of form was Hook himself showing? Misguided man though he was, +we may be glad, without sympathising with him, that in the end he was +true to the traditions of his race. The other boys were flying around +him now, flouting, scornful; and he staggered about the deck striking up +at them impotently, his mind was no longer with them; it was slouching +in the playing fields of long ago, or being sent up [to the headmaster] +for good, or watching the wall-game from a famous wall. And his shoes +were right, and his waistcoat was right, and his tie was right, and his +socks were right. + +James Hook, thou not wholly unheroic figure, farewell. + +For we have come to his last moment. + +Seeing Peter slowly advancing upon him through the air with dagger +poised, he sprang upon the bulwarks to cast himself into the sea. He +did not know that the crocodile was waiting for him; for we purposely +stopped the clock that this knowledge might be spared him: a little mark +of respect from us at the end. + +He had one last triumph, which I think we need not grudge him. As he +stood on the bulwark looking over his shoulder at Peter gliding through +the air, he invited him with a gesture to use his foot. It made Peter +kick instead of stab. + +At last Hook had got the boon for which he craved. + +“Bad form,” he cried jeeringly, and went content to the crocodile. + +Thus perished James Hook. + +“Seventeen,” Slightly sang out; but he was not quite correct in his +figures. Fifteen paid the penalty for their crimes that night; but two +reached the shore: Starkey to be captured by the redskins, who made him +nurse for all their papooses, a melancholy come-down for a pirate; and +Smee, who henceforth wandered about the world in his spectacles, making +a precarious living by saying he was the only man that Jas. Hook had +feared. + +Wendy, of course, had stood by taking no part in the fight, though +watching Peter with glistening eyes; but now that all was over she +became prominent again. She praised them equally, and shuddered +delightfully when Michael showed her the place where he had killed one; +and then she took them into Hook's cabin and pointed to his watch which +was hanging on a nail. It said “half-past one!” + +The lateness of the hour was almost the biggest thing of all. She got +them to bed in the pirates' bunks pretty quickly, you may be sure; all +but Peter, who strutted up and down on the deck, until at last he fell +asleep by the side of Long Tom. He had one of his dreams that night, and +cried in his sleep for a long time, and Wendy held him tightly. + + + + +Chapter 16 THE RETURN HOME + +By three bells that morning they were all stirring their stumps [legs]; +for there was a big sea running; and Tootles, the bo'sun, was among +them, with a rope's end in his hand and chewing tobacco. They all donned +pirate clothes cut off at the knee, shaved smartly, and tumbled up, with +the true nautical roll and hitching their trousers. + +It need not be said who was the captain. Nibs and John were first and +second mate. There was a woman aboard. The rest were tars [sailors] +before the mast, and lived in the fo'c'sle. Peter had already lashed +himself to the wheel; but he piped all hands and delivered a short +address to them; said he hoped they would do their duty like gallant +hearties, but that he knew they were the scum of Rio and the Gold Coast, +and if they snapped at him he would tear them. The bluff strident words +struck the note sailors understood, and they cheered him lustily. Then +a few sharp orders were given, and they turned the ship round, and nosed +her for the mainland. + +Captain Pan calculated, after consulting the ship's chart, that if this +weather lasted they should strike the Azores about the 21st of June, +after which it would save time to fly. + +Some of them wanted it to be an honest ship and others were in favour +of keeping it a pirate; but the captain treated them as dogs, and they +dared not express their wishes to him even in a round robin [one person +after another, as they had to Cpt. Hook]. Instant obedience was the only +safe thing. Slightly got a dozen for looking perplexed when told to take +soundings. The general feeling was that Peter was honest just now to +lull Wendy's suspicions, but that there might be a change when the new +suit was ready, which, against her will, she was making for him out of +some of Hook's wickedest garments. It was afterwards whispered among +them that on the first night he wore this suit he sat long in the cabin +with Hook's cigar-holder in his mouth and one hand clenched, all but for +the forefinger, which he bent and held threateningly aloft like a hook. + +Instead of watching the ship, however, we must now return to that +desolate home from which three of our characters had taken heartless +flight so long ago. It seems a shame to have neglected No. 14 all this +time; and yet we may be sure that Mrs. Darling does not blame us. If we +had returned sooner to look with sorrowful sympathy at her, she would +probably have cried, “Don't be silly; what do I matter? Do go back and +keep an eye on the children.” So long as mothers are like this their +children will take advantage of them; and they may lay to [bet on] that. + +Even now we venture into that familiar nursery only because its lawful +occupants are on their way home; we are merely hurrying on in advance +of them to see that their beds are properly aired and that Mr. and Mrs. +Darling do not go out for the evening. We are no more than servants. Why +on earth should their beds be properly aired, seeing that they left them +in such a thankless hurry? Would it not serve them jolly well right if +they came back and found that their parents were spending the week-end +in the country? It would be the moral lesson they have been in need +of ever since we met them; but if we contrived things in this way Mrs. +Darling would never forgive us. + +One thing I should like to do immensely, and that is to tell her, in the +way authors have, that the children are coming back, that indeed they +will be here on Thursday week. This would spoil so completely the +surprise to which Wendy and John and Michael are looking forward. They +have been planning it out on the ship: mother's rapture, father's shout +of joy, Nana's leap through the air to embrace them first, when what +they ought to be prepared for is a good hiding. How delicious to spoil +it all by breaking the news in advance; so that when they enter grandly +Mrs. Darling may not even offer Wendy her mouth, and Mr. Darling may +exclaim pettishly, “Dash it all, here are those boys again.” However, +we should get no thanks even for this. We are beginning to know Mrs. +Darling by this time, and may be sure that she would upbraid us for +depriving the children of their little pleasure. + +“But, my dear madam, it is ten days till Thursday week; so that by +telling you what's what, we can save you ten days of unhappiness.” + +“Yes, but at what a cost! By depriving the children of ten minutes of +delight.” + +“Oh, if you look at it in that way!” + +“What other way is there in which to look at it?” + +You see, the woman had no proper spirit. I had meant to say +extraordinarily nice things about her; but I despise her, and not one of +them will I say now. She does not really need to be told to have things +ready, for they are ready. All the beds are aired, and she never leaves +the house, and observe, the window is open. For all the use we are to +her, we might well go back to the ship. However, as we are here we may +as well stay and look on. That is all we are, lookers-on. Nobody really +wants us. So let us watch and say jaggy things, in the hope that some of +them will hurt. + +The only change to be seen in the night-nursery is that between nine +and six the kennel is no longer there. When the children flew away, Mr. +Darling felt in his bones that all the blame was his for having chained +Nana up, and that from first to last she had been wiser than he. Of +course, as we have seen, he was quite a simple man; indeed he might have +passed for a boy again if he had been able to take his baldness off; +but he had also a noble sense of justice and a lion's courage to do what +seemed right to him; and having thought the matter out with anxious care +after the flight of the children, he went down on all fours and crawled +into the kennel. To all Mrs. Darling's dear invitations to him to come +out he replied sadly but firmly: + +“No, my own one, this is the place for me.” + +In the bitterness of his remorse he swore that he would never leave +the kennel until his children came back. Of course this was a pity; but +whatever Mr. Darling did he had to do in excess, otherwise he soon gave +up doing it. And there never was a more humble man than the once proud +George Darling, as he sat in the kennel of an evening talking with his +wife of their children and all their pretty ways. + +Very touching was his deference to Nana. He would not let her come into +the kennel, but on all other matters he followed her wishes implicitly. + +Every morning the kennel was carried with Mr. Darling in it to a cab, +which conveyed him to his office, and he returned home in the same way +at six. Something of the strength of character of the man will be seen +if we remember how sensitive he was to the opinion of neighbours: this +man whose every movement now attracted surprised attention. Inwardly he +must have suffered torture; but he preserved a calm exterior even when +the young criticised his little home, and he always lifted his hat +courteously to any lady who looked inside. + +It may have been Quixotic, but it was magnificent. Soon the inward +meaning of it leaked out, and the great heart of the public was touched. +Crowds followed the cab, cheering it lustily; charming girls scaled it +to get his autograph; interviews appeared in the better class of papers, +and society invited him to dinner and added, “Do come in the kennel.” + +On that eventful Thursday week, Mrs. Darling was in the night-nursery +awaiting George's return home; a very sad-eyed woman. Now that we look +at her closely and remember the gaiety of her in the old days, all gone +now just because she has lost her babes, I find I won't be able to say +nasty things about her after all. If she was too fond of her rubbishy +children, she couldn't help it. Look at her in her chair, where she has +fallen asleep. The corner of her mouth, where one looks first, is almost +withered up. Her hand moves restlessly on her breast as if she had a +pain there. Some like Peter best, and some like Wendy best, but I like +her best. Suppose, to make her happy, we whisper to her in her sleep +that the brats are coming back. They are really within two miles of the +window now, and flying strong, but all we need whisper is that they are +on the way. Let's. + +It is a pity we did it, for she has started up, calling their names; and +there is no one in the room but Nana. + +“O Nana, I dreamt my dear ones had come back.” + +Nana had filmy eyes, but all she could do was put her paw gently on her +mistress's lap; and they were sitting together thus when the kennel was +brought back. As Mr. Darling puts his head out to kiss his wife, we see +that his face is more worn than of yore, but has a softer expression. + +He gave his hat to Liza, who took it scornfully; for she had no +imagination, and was quite incapable of understanding the motives of +such a man. Outside, the crowd who had accompanied the cab home were +still cheering, and he was naturally not unmoved. + +“Listen to them,” he said; “it is very gratifying.” + +“Lots of little boys,” sneered Liza. + +“There were several adults to-day,” he assured her with a faint flush; +but when she tossed her head he had not a word of reproof for her. +Social success had not spoilt him; it had made him sweeter. For some +time he sat with his head out of the kennel, talking with Mrs. Darling +of this success, and pressing her hand reassuringly when she said she +hoped his head would not be turned by it. + +“But if I had been a weak man,” he said. “Good heavens, if I had been a +weak man!” + +“And, George,” she said timidly, “you are as full of remorse as ever, +aren't you?” + +“Full of remorse as ever, dearest! See my punishment: living in a +kennel.” + +“But it is punishment, isn't it, George? You are sure you are not +enjoying it?” + +“My love!” + +You may be sure she begged his pardon; and then, feeling drowsy, he +curled round in the kennel. + +“Won't you play me to sleep,” he asked, “on the nursery piano?” and as +she was crossing to the day-nursery he added thoughtlessly, “And shut +that window. I feel a draught.” + +“O George, never ask me to do that. The window must always be left open +for them, always, always.” + +Now it was his turn to beg her pardon; and she went into the day-nursery +and played, and soon he was asleep; and while he slept, Wendy and John +and Michael flew into the room. + +Oh no. We have written it so, because that was the charming arrangement +planned by them before we left the ship; but something must have +happened since then, for it is not they who have flown in, it is Peter +and Tinker Bell. + +Peter's first words tell all. + +“Quick Tink,” he whispered, “close the window; bar it! That's right. Now +you and I must get away by the door; and when Wendy comes she will think +her mother has barred her out; and she will have to go back with me.” + +Now I understand what had hitherto puzzled me, why when Peter had +exterminated the pirates he did not return to the island and leave Tink +to escort the children to the mainland. This trick had been in his head +all the time. + +Instead of feeling that he was behaving badly he danced with glee; then +he peeped into the day-nursery to see who was playing. He whispered to +Tink, “It's Wendy's mother! She is a pretty lady, but not so pretty as +my mother. Her mouth is full of thimbles, but not so full as my mother's +was.” + +Of course he knew nothing whatever about his mother; but he sometimes +bragged about her. + +He did not know the tune, which was “Home, Sweet Home,” but he knew it +was saying, “Come back, Wendy, Wendy, Wendy”; and he cried exultantly, +“You will never see Wendy again, lady, for the window is barred!” + +He peeped in again to see why the music had stopped, and now he saw +that Mrs. Darling had laid her head on the box, and that two tears were +sitting on her eyes. + +“She wants me to unbar the window,” thought Peter, “but I won't, not I!” + +He peeped again, and the tears were still there, or another two had +taken their place. + +“She's awfully fond of Wendy,” he said to himself. He was angry with her +now for not seeing why she could not have Wendy. + +The reason was so simple: “I'm fond of her too. We can't both have her, +lady.” + +But the lady would not make the best of it, and he was unhappy. He +ceased to look at her, but even then she would not let go of him. He +skipped about and made funny faces, but when he stopped it was just as +if she were inside him, knocking. + +“Oh, all right,” he said at last, and gulped. Then he unbarred the +window. “Come on, Tink,” he cried, with a frightful sneer at the laws of +nature; “we don't want any silly mothers;” and he flew away. + +Thus Wendy and John and Michael found the window open for them after +all, which of course was more than they deserved. They alighted on the +floor, quite unashamed of themselves, and the youngest one had already +forgotten his home. + +“John,” he said, looking around him doubtfully, “I think I have been +here before.” + +“Of course you have, you silly. There is your old bed.” + +“So it is,” Michael said, but not with much conviction. + +“I say,” cried John, “the kennel!” and he dashed across to look into it. + +“Perhaps Nana is inside it,” Wendy said. + +But John whistled. “Hullo,” he said, “there's a man inside it.” + +“It's father!” exclaimed Wendy. + +“Let me see father,” Michael begged eagerly, and he took a good look. +“He is not so big as the pirate I killed,” he said with such frank +disappointment that I am glad Mr. Darling was asleep; it would have been +sad if those had been the first words he heard his little Michael say. + +Wendy and John had been taken aback somewhat at finding their father in +the kennel. + +“Surely,” said John, like one who had lost faith in his memory, “he used +not to sleep in the kennel?” + +“John,” Wendy said falteringly, “perhaps we don't remember the old life +as well as we thought we did.” + +A chill fell upon them; and serve them right. + +“It is very careless of mother,” said that young scoundrel John, “not to +be here when we come back.” + +It was then that Mrs. Darling began playing again. + +“It's mother!” cried Wendy, peeping. + +“So it is!” said John. + +“Then are you not really our mother, Wendy?” asked Michael, who was +surely sleepy. + +“Oh dear!” exclaimed Wendy, with her first real twinge of remorse [for +having gone], “it was quite time we came back.” + +“Let us creep in,” John suggested, “and put our hands over her eyes.” + +But Wendy, who saw that they must break the joyous news more gently, had +a better plan. + +“Let us all slip into our beds, and be there when she comes in, just as +if we had never been away.” + +And so when Mrs. Darling went back to the night-nursery to see if her +husband was asleep, all the beds were occupied. The children waited +for her cry of joy, but it did not come. She saw them, but she did not +believe they were there. You see, she saw them in their beds so often in +her dreams that she thought this was just the dream hanging around her +still. + +She sat down in the chair by the fire, where in the old days she had +nursed them. + +They could not understand this, and a cold fear fell upon all the three +of them. + +“Mother!” Wendy cried. + +“That's Wendy,” she said, but still she was sure it was the dream. + +“Mother!” + +“That's John,” she said. + +“Mother!” cried Michael. He knew her now. + +“That's Michael,” she said, and she stretched out her arms for the three +little selfish children they would never envelop again. Yes, they did, +they went round Wendy and John and Michael, who had slipped out of bed +and run to her. + +“George, George!” she cried when she could speak; and Mr. Darling woke +to share her bliss, and Nana came rushing in. There could not have been +a lovelier sight; but there was none to see it except a little boy who +was staring in at the window. He had had ecstasies innumerable that +other children can never know; but he was looking through the window at +the one joy from which he must be for ever barred. + + + + +Chapter 17 WHEN WENDY GREW UP + +I hope you want to know what became of the other boys. They were waiting +below to give Wendy time to explain about them; and when they had +counted five hundred they went up. They went up by the stair, because +they thought this would make a better impression. They stood in a row +in front of Mrs. Darling, with their hats off, and wishing they were not +wearing their pirate clothes. They said nothing, but their eyes asked +her to have them. They ought to have looked at Mr. Darling also, but +they forgot about him. + +Of course Mrs. Darling said at once that she would have them; but Mr. +Darling was curiously depressed, and they saw that he considered six a +rather large number. + +“I must say,” he said to Wendy, “that you don't do things by halves,” a +grudging remark which the twins thought was pointed at them. + +The first twin was the proud one, and he asked, flushing, “Do you think +we should be too much of a handful, sir? Because, if so, we can go +away.” + +“Father!” Wendy cried, shocked; but still the cloud was on him. He knew +he was behaving unworthily, but he could not help it. + +“We could lie doubled up,” said Nibs. + +“I always cut their hair myself,” said Wendy. + +“George!” Mrs. Darling exclaimed, pained to see her dear one showing +himself in such an unfavourable light. + +Then he burst into tears, and the truth came out. He was as glad to +have them as she was, he said, but he thought they should have asked his +consent as well as hers, instead of treating him as a cypher [zero] in +his own house. + +“I don't think he is a cypher,” Tootles cried instantly. “Do you think +he is a cypher, Curly?” + +“No, I don't. Do you think he is a cypher, Slightly?” + +“Rather not. Twin, what do you think?” + +It turned out that not one of them thought him a cypher; and he was +absurdly gratified, and said he would find space for them all in the +drawing-room if they fitted in. + +“We'll fit in, sir,” they assured him. + +“Then follow the leader,” he cried gaily. “Mind you, I am not sure that +we have a drawing-room, but we pretend we have, and it's all the same. +Hoop la!” + +He went off dancing through the house, and they all cried “Hoop la!” and +danced after him, searching for the drawing-room; and I forget whether +they found it, but at any rate they found corners, and they all fitted +in. + +As for Peter, he saw Wendy once again before he flew away. He did not +exactly come to the window, but he brushed against it in passing so that +she could open it if she liked and call to him. That is what she did. + +“Hullo, Wendy, good-bye,” he said. + +“Oh dear, are you going away?” + +“Yes.” + +“You don't feel, Peter,” she said falteringly, “that you would like to +say anything to my parents about a very sweet subject?” + +“No.” + +“About me, Peter?” + +“No.” + +Mrs. Darling came to the window, for at present she was keeping a sharp +eye on Wendy. She told Peter that she had adopted all the other boys, +and would like to adopt him also. + +“Would you send me to school?” he inquired craftily. + +“Yes.” + +“And then to an office?” + +“I suppose so.” + +“Soon I would be a man?” + +“Very soon.” + +“I don't want to go to school and learn solemn things,” he told her +passionately. “I don't want to be a man. O Wendy's mother, if I was to +wake up and feel there was a beard!” + +“Peter,” said Wendy the comforter, “I should love you in a beard;” and +Mrs. Darling stretched out her arms to him, but he repulsed her. + +“Keep back, lady, no one is going to catch me and make me a man.” + +“But where are you going to live?” + +“With Tink in the house we built for Wendy. The fairies are to put it +high up among the tree tops where they sleep at nights.” + +“How lovely,” cried Wendy so longingly that Mrs. Darling tightened her +grip. + +“I thought all the fairies were dead,” Mrs. Darling said. + +“There are always a lot of young ones,” explained Wendy, who was now +quite an authority, “because you see when a new baby laughs for the +first time a new fairy is born, and as there are always new babies there +are always new fairies. They live in nests on the tops of trees; and the +mauve ones are boys and the white ones are girls, and the blue ones are +just little sillies who are not sure what they are.” + +“I shall have such fun,” said Peter, with eye on Wendy. + +“It will be rather lonely in the evening,” she said, “sitting by the +fire.” + +“I shall have Tink.” + +“Tink can't go a twentieth part of the way round,” she reminded him a +little tartly. + +“Sneaky tell-tale!” Tink called out from somewhere round the corner. + +“It doesn't matter,” Peter said. + +“O Peter, you know it matters.” + +“Well, then, come with me to the little house.” + +“May I, mummy?” + +“Certainly not. I have got you home again, and I mean to keep you.” + +“But he does so need a mother.” + +“So do you, my love.” + +“Oh, all right,” Peter said, as if he had asked her from politeness +merely; but Mrs. Darling saw his mouth twitch, and she made this +handsome offer: to let Wendy go to him for a week every year to do +his spring cleaning. Wendy would have preferred a more permanent +arrangement; and it seemed to her that spring would be long in coming; +but this promise sent Peter away quite gay again. He had no sense of +time, and was so full of adventures that all I have told you about him +is only a halfpenny-worth of them. I suppose it was because Wendy knew +this that her last words to him were these rather plaintive ones: + +“You won't forget me, Peter, will you, before spring cleaning time +comes?” + +Of course Peter promised; and then he flew away. He took Mrs. Darling's +kiss with him. The kiss that had been for no one else, Peter took quite +easily. Funny. But she seemed satisfied. + +Of course all the boys went to school; and most of them got into Class +III, but Slightly was put first into Class IV and then into Class V. +Class I is the top class. Before they had attended school a week they +saw what goats they had been not to remain on the island; but it was too +late now, and soon they settled down to being as ordinary as you or me +or Jenkins minor [the younger Jenkins]. It is sad to have to say that +the power to fly gradually left them. At first Nana tied their feet to +the bed-posts so that they should not fly away in the night; and one of +their diversions by day was to pretend to fall off buses [the English +double-deckers]; but by and by they ceased to tug at their bonds in bed, +and found that they hurt themselves when they let go of the bus. In time +they could not even fly after their hats. Want of practice, they called +it; but what it really meant was that they no longer believed. + +Michael believed longer than the other boys, though they jeered at him; +so he was with Wendy when Peter came for her at the end of the first +year. She flew away with Peter in the frock she had woven from leaves +and berries in the Neverland, and her one fear was that he might notice +how short it had become; but he never noticed, he had so much to say +about himself. + +She had looked forward to thrilling talks with him about old times, but +new adventures had crowded the old ones from his mind. + +“Who is Captain Hook?” he asked with interest when she spoke of the arch +enemy. + +“Don't you remember,” she asked, amazed, “how you killed him and saved +all our lives?” + +“I forget them after I kill them,” he replied carelessly. + +When she expressed a doubtful hope that Tinker Bell would be glad to see +her he said, “Who is Tinker Bell?” + +“O Peter,” she said, shocked; but even when she explained he could not +remember. + +“There are such a lot of them,” he said. “I expect she is no more.” + +I expect he was right, for fairies don't live long, but they are so +little that a short time seems a good while to them. + +Wendy was pained too to find that the past year was but as yesterday +to Peter; it had seemed such a long year of waiting to her. But he was +exactly as fascinating as ever, and they had a lovely spring cleaning in +the little house on the tree tops. + +Next year he did not come for her. She waited in a new frock because the +old one simply would not meet; but he never came. + +“Perhaps he is ill,” Michael said. + +“You know he is never ill.” + +Michael came close to her and whispered, with a shiver, “Perhaps there +is no such person, Wendy!” and then Wendy would have cried if Michael +had not been crying. + +Peter came next spring cleaning; and the strange thing was that he never +knew he had missed a year. + +That was the last time the girl Wendy ever saw him. For a little longer +she tried for his sake not to have growing pains; and she felt she was +untrue to him when she got a prize for general knowledge. But the years +came and went without bringing the careless boy; and when they met again +Wendy was a married woman, and Peter was no more to her than a little +dust in the box in which she had kept her toys. Wendy was grown up. You +need not be sorry for her. She was one of the kind that likes to grow +up. In the end she grew up of her own free will a day quicker than other +girls. + +All the boys were grown up and done for by this time; so it is scarcely +worth while saying anything more about them. You may see the twins and +Nibs and Curly any day going to an office, each carrying a little bag +and an umbrella. Michael is an engine-driver [train engineer]. Slightly +married a lady of title, and so he became a lord. You see that judge in +a wig coming out at the iron door? That used to be Tootles. The bearded +man who doesn't know any story to tell his children was once John. + +Wendy was married in white with a pink sash. It is strange to think +that Peter did not alight in the church and forbid the banns [formal +announcement of a marriage]. + +Years rolled on again, and Wendy had a daughter. This ought not to be +written in ink but in a golden splash. + +She was called Jane, and always had an odd inquiring look, as if from +the moment she arrived on the mainland she wanted to ask questions. When +she was old enough to ask them they were mostly about Peter Pan. She +loved to hear of Peter, and Wendy told her all she could remember in the +very nursery from which the famous flight had taken place. It was +Jane's nursery now, for her father had bought it at the three per cents +[mortgage rate] from Wendy's father, who was no longer fond of stairs. +Mrs. Darling was now dead and forgotten. + +There were only two beds in the nursery now, Jane's and her nurse's; and +there was no kennel, for Nana also had passed away. She died of old age, +and at the end she had been rather difficult to get on with; being very +firmly convinced that no one knew how to look after children except +herself. + +Once a week Jane's nurse had her evening off; and then it was Wendy's +part to put Jane to bed. That was the time for stories. It was Jane's +invention to raise the sheet over her mother's head and her own, thus +making a tent, and in the awful darkness to whisper: + +“What do we see now?” + +“I don't think I see anything to-night,” says Wendy, with a feeling that +if Nana were here she would object to further conversation. + +“Yes, you do,” says Jane, “you see when you were a little girl.” + +“That is a long time ago, sweetheart,” says Wendy. “Ah me, how time +flies!” + +“Does it fly,” asks the artful child, “the way you flew when you were a +little girl?” + +“The way I flew? Do you know, Jane, I sometimes wonder whether I ever +did really fly.” + +“Yes, you did.” + +“The dear old days when I could fly!” + +“Why can't you fly now, mother?” + +“Because I am grown up, dearest. When people grow up they forget the +way.” + +“Why do they forget the way?” + +“Because they are no longer gay and innocent and heartless. It is only +the gay and innocent and heartless who can fly.” + +“What is gay and innocent and heartless? I do wish I were gay and +innocent and heartless.” + +Or perhaps Wendy admits she does see something. + +“I do believe,” she says, “that it is this nursery.” + +“I do believe it is,” says Jane. “Go on.” + +They are now embarked on the great adventure of the night when Peter +flew in looking for his shadow. + +“The foolish fellow,” says Wendy, “tried to stick it on with soap, and +when he could not he cried, and that woke me, and I sewed it on for +him.” + +“You have missed a bit,” interrupts Jane, who now knows the story better +than her mother. “When you saw him sitting on the floor crying, what did +you say?” + +“I sat up in bed and I said, 'Boy, why are you crying?'” + +“Yes, that was it,” says Jane, with a big breath. + +“And then he flew us all away to the Neverland and the fairies and the +pirates and the redskins and the mermaids' lagoon, and the home under +the ground, and the little house.” + +“Yes! which did you like best of all?” + +“I think I liked the home under the ground best of all.” + +“Yes, so do I. What was the last thing Peter ever said to you?” + +“The last thing he ever said to me was, 'Just always be waiting for me, +and then some night you will hear me crowing.'” + +“Yes.” + +“But, alas, he forgot all about me,” Wendy said it with a smile. She was +as grown up as that. + +“What did his crow sound like?” Jane asked one evening. + +“It was like this,” Wendy said, trying to imitate Peter's crow. + +“No, it wasn't,” Jane said gravely, “it was like this;” and she did it +ever so much better than her mother. + +Wendy was a little startled. “My darling, how can you know?” + +“I often hear it when I am sleeping,” Jane said. + +“Ah yes, many girls hear it when they are sleeping, but I was the only +one who heard it awake.” + +“Lucky you,” said Jane. + +And then one night came the tragedy. It was the spring of the year, and +the story had been told for the night, and Jane was now asleep in her +bed. Wendy was sitting on the floor, very close to the fire, so as to +see to darn, for there was no other light in the nursery; and while she +sat darning she heard a crow. Then the window blew open as of old, and +Peter dropped in on the floor. + +He was exactly the same as ever, and Wendy saw at once that he still had +all his first teeth. + +He was a little boy, and she was grown up. She huddled by the fire not +daring to move, helpless and guilty, a big woman. + +“Hullo, Wendy,” he said, not noticing any difference, for he was +thinking chiefly of himself; and in the dim light her white dress might +have been the nightgown in which he had seen her first. + +“Hullo, Peter,” she replied faintly, squeezing herself as small as +possible. Something inside her was crying “Woman, Woman, let go of me.” + +“Hullo, where is John?” he asked, suddenly missing the third bed. + +“John is not here now,” she gasped. + +“Is Michael asleep?” he asked, with a careless glance at Jane. + +“Yes,” she answered; and now she felt that she was untrue to Jane as +well as to Peter. + +“That is not Michael,” she said quickly, lest a judgment should fall on +her. + +Peter looked. “Hullo, is it a new one?” + +“Yes.” + +“Boy or girl?” + +“Girl.” + +Now surely he would understand; but not a bit of it. + +“Peter,” she said, faltering, “are you expecting me to fly away with +you?” + +“Of course; that is why I have come.” He added a little sternly, “Have +you forgotten that this is spring cleaning time?” + +She knew it was useless to say that he had let many spring cleaning +times pass. + +“I can't come,” she said apologetically, “I have forgotten how to fly.” + +“I'll soon teach you again.” + +“O Peter, don't waste the fairy dust on me.” + +She had risen; and now at last a fear assailed him. “What is it?” he +cried, shrinking. + +“I will turn up the light,” she said, “and then you can see for +yourself.” + +For almost the only time in his life that I know of, Peter was afraid. +“Don't turn up the light,” he cried. + +She let her hands play in the hair of the tragic boy. She was not a +little girl heart-broken about him; she was a grown woman smiling at it +all, but they were wet-eyed smiles. + +Then she turned up the light, and Peter saw. He gave a cry of pain; and +when the tall beautiful creature stooped to lift him in her arms he drew +back sharply. + +“What is it?” he cried again. + +She had to tell him. + +“I am old, Peter. I am ever so much more than twenty. I grew up long +ago.” + +“You promised not to!” + +“I couldn't help it. I am a married woman, Peter.” + +“No, you're not.” + +“Yes, and the little girl in the bed is my baby.” + +“No, she's not.” + +But he supposed she was; and he took a step towards the sleeping child +with his dagger upraised. Of course he did not strike. He sat down on +the floor instead and sobbed; and Wendy did not know how to comfort him, +though she could have done it so easily once. She was only a woman now, +and she ran out of the room to try to think. + +Peter continued to cry, and soon his sobs woke Jane. She sat up in bed, +and was interested at once. + +“Boy,” she said, “why are you crying?” + +Peter rose and bowed to her, and she bowed to him from the bed. + +“Hullo,” he said. + +“Hullo,” said Jane. + +“My name is Peter Pan,” he told her. + +“Yes, I know.” + +“I came back for my mother,” he explained, “to take her to the +Neverland.” + +“Yes, I know,” Jane said, “I have been waiting for you.” + +When Wendy returned diffidently she found Peter sitting on the bed-post +crowing gloriously, while Jane in her nighty was flying round the room +in solemn ecstasy. + +“She is my mother,” Peter explained; and Jane descended and stood by his +side, with the look in her face that he liked to see on ladies when they +gazed at him. + +“He does so need a mother,” Jane said. + +“Yes, I know,” Wendy admitted rather forlornly; “no one knows it so well +as I.” + +“Good-bye,” said Peter to Wendy; and he rose in the air, and the +shameless Jane rose with him; it was already her easiest way of moving +about. + +Wendy rushed to the window. + +“No, no,” she cried. + +“It is just for spring cleaning time,” Jane said, “he wants me always to +do his spring cleaning.” + +“If only I could go with you,” Wendy sighed. + +“You see you can't fly,” said Jane. + +Of course in the end Wendy let them fly away together. Our last glimpse +of her shows her at the window, watching them receding into the sky +until they were as small as stars. + +As you look at Wendy, you may see her hair becoming white, and her +figure little again, for all this happened long ago. Jane is now a +common grown-up, with a daughter called Margaret; and every spring +cleaning time, except when he forgets, Peter comes for Margaret and +takes her to the Neverland, where she tells him stories about himself, +to which he listens eagerly. When Margaret grows up she will have a +daughter, who is to be Peter's mother in turn; and thus it will go on, +so long as children are gay and innocent and heartless. + + +THE END diff --git a/Solutions/Assignment06/Aksessering av karakterer i en streng - lf.ipynb b/Solutions/Assignment06/Aksessering av karakterer i en streng - lf.ipynb new file mode 100644 index 0000000..f93b655 --- /dev/null +++ b/Solutions/Assignment06/Aksessering av karakterer i en streng - lf.ipynb @@ -0,0 +1,47 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#Oppgave a\n", + "def letters(s):\n", + " for ch in s:\n", + " print(ch)\n", + " \n", + "#Oppgave b\n", + "def third_letter(s):\n", + " if len(s)<3:\n", + " return 'q'\n", + " return s[2]\n", + " \n", + "#Oppgave c\n", + "def length(s):\n", + " return len(s)-1" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.16" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Solutions/Assignment06/Fjesboka - Lf.ipynb b/Solutions/Assignment06/Fjesboka - Lf.ipynb new file mode 100644 index 0000000..a3ca0e6 --- /dev/null +++ b/Solutions/Assignment06/Fjesboka - Lf.ipynb @@ -0,0 +1,69 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#a)\n", + "\n", + "def add_data(str):\n", + " user = str.split()\n", + " user[2] = int(user[2])\n", + " return user\n", + "\n", + "#b)\n", + "\n", + "def get_person(given_name, facebook):\n", + " people = []\n", + " for person in facebook:\n", + " if person[0] == given_name:\n", + " people.append(person)\n", + " return people\n", + "\n", + "#c)\n", + "\n", + "def main():\n", + " facebook = []\n", + " user = ''\n", + " name = ''\n", + " print('Hello, welcometo Facebook. Add a new user by writing \"given_name surname age gender relationship_status\"')\n", + " \n", + " while True:\n", + " user = input('Add a new user: ')\n", + " if user == 'done':\n", + " break\n", + " facebook.append(add_data(user))\n", + " print('Ok')\n", + " while True:\n", + " name = input('Search for a user: ')\n", + " if name == 'done':\n", + " break\n", + " print(get_person(name, facebook))\n", + "main()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.16" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Solutions/Assignment06/Gaussian_elimination_solutions.ipynb b/Solutions/Assignment06/Gaussian_elimination_solutions.ipynb new file mode 100644 index 0000000..d16f1c3 --- /dev/null +++ b/Solutions/Assignment06/Gaussian_elimination_solutions.ipynb @@ -0,0 +1,635 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "[Back to assignment 7](_Oving7.ipynb)\n", + "# Gaussian Elimination" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "heading_collapsed": true + }, + "source": [ + "#### Gaussian Elimination with partial pivoting" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "hidden": true + }, + "source": [ + "Gaussian elimination, or row reduction, is an algorithm for solving linear systems presented in augmented matrix form. It works by reducing an augmented matrix to a triangular form, before performing back substitution to obtain solution variables.\n", + "\n", + "A linear system, here with three unknowns $x_0,x_1,x_2$ is of the form \n", + "$$ a_{00}x_0 + a_{01}x_1 + a_{02}x_2 = b_0 $$\n", + "$$a_{10}x_0 + a_{11}x_1 + a_{12}x_2 = b_1$$\n", + "$$a_{20}x_0 + a_{21}x_1 + a_{22}x_2 = b_2.$$\n", + "\n", + "We can represent it in the more abstract matrix form $Ax=b$, where\n", + "$$ A = \n", + "\\begin{bmatrix}\n", + "a_{00} & a_{01} & a_{02}\\\\\n", + "a_{10} & a_{11} & a_{12}\\\\\n", + "a_{20} & a_{21} & a_{22}\n", + "\\end{bmatrix}, \\quad\n", + "x = \n", + "\\begin{bmatrix}\n", + "x_{0}\\\\\n", + "x_{1}\\\\\n", + "x_{2}\n", + "\\end{bmatrix}, \\quad\n", + "b = \n", + "\\begin{bmatrix}\n", + "b_{0}\\\\\n", + "b_{1}\\\\\n", + "b_{2}\n", + "\\end{bmatrix}.$$\n", + "\n", + "\n", + "To solve a linear system by Gaussian elimination, we first state it in *augmented* form\n", + "\n", + "\n", + "$$\\left[\\begin{array}{ccc|c}\n", + "a_{00} & a_{01} & a_{02} & b_{0} \\\\\n", + "a_{10} & a_{11} & a_{12} & b_{1} \\\\\n", + "a_{20} & a_{21} & a_{22} & b_{2}\n", + "\\end{array}\\right]$$\n", + "\n", + "Then, we reduce it to a triangular form using row operations only, in a systematic fashion. We start with the *pivot column* being column no. 0 and the pivot row being row no. 0. Then we repeat the following pattern:\n", + "\n", + "1. Find the maximum entry (in absolute value) in the pivot column from the pivot row to the bottom.\n", + " - If this is not possible (i.e. all rows below the pivot row, including the pivot row have 0 in the pivot column), increase the index of the pivot column by 1 and repeat.\n", + "2. Swap the entries in the pivot row and the row with the maximum value.\n", + "3. Add multiples of the pivot row to the rows below such that the pivot column has only 0 entries after the pivot row. This means: If the pivot element has value $a_{ij}$ and the element of same column in a later row has value $a_{kj}$, add $\\frac{-a_{kj}}{a_{ij}}$ multiples of the pivot row to that row.\n", + "4. Increase the numbering of the pivot row and the pivot column by 1.\n", + "5. If the pivot row is the last row and/or if the pivot column number exceeds the number of columns in the matrix (not counting the extra column with $b_0,b_1,b_2$ ), stop the iterations. Otherwise, repeat from step 1." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "hidden": true + }, + "source": [ + "This procedure changes the entries in the matrix, which we in general now call $\\tilde{a}_{ij}$. The matrix should now be in *upper triangular* or *echelon form*:\n", + "$$\\left[\\begin{array}{ccc|c}\n", + "\\tilde{a}_{00} & \\tilde{a}_{01} & \\tilde{a}_{02} & \\tilde{b}_{0} \\\\\n", + "0 & \\tilde{a}_{11} & \\tilde{a}_{12} & \\tilde{b}_{1} \\\\\n", + "0 & 0 & \\tilde{a}_{22} & \\tilde{b}_{2}\n", + "\\end{array}\\right].$$\n", + "\n", + "This corresponds to the linear system\n", + "\n", + "$$\\tilde{a}_{00}x_0 + \\tilde{a}_{01}x_1 + \\tilde{a}_{02}x_2 = \\tilde{b}_0$$\n", + "$$\\tilde{a}_{11}x_1 + \\tilde{a}_{12}x_2 = \\tilde{b}_1$$\n", + "$$ \\tilde{a}_{22}x_2 = \\tilde{b}_2.$$\n", + "\n", + "\n", + "We can easily solve this system by backsubstitution, observing that $\\tilde{x}_{2} = \\frac{\\tilde{b}_2}{\\tilde{a}_{22}},$, and that $\\tilde{x}_{1} = \\frac{\\tilde{b}_1 - \\tilde{a}_{12}x_2}{\\tilde{a}_{11}}.$ In general, after reducing the matrix to upper triangular form we can deduce that for a system of $n$ unknowns, $$ x_j = \\frac{\\tilde{b}_j - \\sum_{k = j+1}^{n}\\tilde{a}_{jk}x_k }{\\tilde{a}_{jj}}.$$\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "hidden": true + }, + "source": [ + "**Example** \n", + "\n", + "Consider a linear system with the following augmented matrix\n", + "$$ \\left[\\begin{array}{ccc|c}\n", + "0 & 1 & 2 & 3 \\\\\n", + "4 & 5 & 6 & 7 \\\\\n", + "8 & 9 & 1 & 2\n", + "\\end{array}\\right].$$\n", + "From step 2, we swap the first row with the thrid row such that the pivot element is the largest in the pivot column\n", + "$$\\left[\\begin{array}{ccc|c}\n", + "8 & 9 & 1 & 2\\\\\n", + "4 & 5 & 6 & 7 \\\\\n", + "0 & 1 & 2 & 3 \n", + "\\end{array}\\right].$$\n", + "\n", + "Following step no. 3, we add (-4/8 = -0.5) times the pivot row to row no.1 and (0/4 = 0) times the pivot row to row no. 2 and get\n", + "$$ \\left[\\begin{array}{ccc|c}\n", + "8 & 9 & 1 & 2 \\\\\n", + "0 & 0.5 & 5.5 & 6 \\\\\n", + "0 & 1 & 2 & 3 \n", + "\\end{array}\\right].$$\n", + "\n", + "Then, from step 4 we increase the numbering of pivot row and column, so our pivot row is 1 and pivot column is also 1. Checking step 5, we do not yet terminate. Returning to step 1, we find the maximal element in column no 1 from row 1 and onward in row 2. Therefore, as in step 2, we swap rows 1 and 2 to get \n", + "\n", + "$$ \\left[\\begin{array}{ccc|c}\n", + "8 & 9 & 1 & 2 \\\\\n", + "0 & 1 & 2 & 3 \\\\\n", + "0 & 0.5 & 5.5 & 6 \n", + "\\end{array}\\right].$$\n", + "\n", + "We then follow step 3, adding a multiple of (-0.5/1 = -0.5) of row 1 to row 2, yielding\n", + "$$\n", + "\\left[\\begin{array}{ccc|c}\n", + "8 & 9 & 1 & 2 \\\\\n", + "0 & 1 & 2 & 3 \\\\\n", + "0 & 0 & 4.5 & 4.5 \n", + "\\end{array}\\right].$$\n", + "\n", + "After step 4, we have row and column indices of 2, which means we are on the final row and so we stop the iterations after step 5.\n", + "\n", + "The above system can be solved by back substitution to find $ x_3 = 1, x_2 = 1, x_1 = -1.$\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## a)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Assign the variable `matrix` for the augmented matrix of the set of equations\n", + "\n", + "$$\n", + "x - 2y + 1z = 0$$\n", + "$$\\quad\\quad 2y - 8z = 8$$\n", + "$$ -4x + 5y + 9z = -9$$\n", + "\n", + "***Write code in the block below***" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[ 1. -2. 1. 0.]\n", + " [ 0. 2. -8. 8.]\n", + " [-4. 5. 9. -9.]]\n" + ] + } + ], + "source": [ + "# SOLUTION\n", + "\n", + "import numpy as np\n", + "\n", + "mat = np.array([[1.,-2.,1.,0.]\n", + " ,[0.,2.,-8.,8.]\n", + " ,[-4.,5.,9.,-9.]])\n", + "\n", + "print(mat)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## b) \n", + "Make a function `add` that takes a matrix `A` and adds a multiple of one row to another. The function should accept `A`, two integers `i1` and `i2` as input (the integers specify which rows to add) and a number `num`. The function should take the rows `A[i1,:]` and `A[i2,:]` then add `num*A[i1,:]` to `A[i2,:]`. The function shall not return anything, but only make changes to `A[i2,:]`.\n", + "\n", + "**Example run**\n", + "\n", + "```python\n", + "A = np.array([[2.,3.,4.], [5.,-3.,6.]])\n", + "add(A,0, 1, -5/2) # add (-5/2) times row 0 to row 1\n", + "print(A)\n", + " \n", + "#Running the code produces the following output:\n", + "[[ 2. 3. 4. ]\n", + " [ 0. -10.5 -4. ]]\n", + "```\n", + "***Write code in the block below***" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[ 2. 3. 4. ]\n", + " [ 0. -10.5 -4. ]]\n" + ] + } + ], + "source": [ + "# SOLUTION\n", + "def add(A, i1, i2, num):\n", + " \n", + " \"\"\"\n", + " A = Matrix of interst\n", + " i2 = row which we will add to\n", + " i1 = Addend (also factor with num)\n", + " \n", + " \"\"\"\n", + " \n", + " A[i2,:] = A[i2,:] + A[i1,:]*num \n", + " \n", + " \n", + "\n", + "# Test the code\n", + "A = np.array([[2.,3.,4.], [5.,-3.,6.]])\n", + "add(A,0, 1, -5/2) # add (-5/2) times row 0 to row 1\n", + "\n", + "print(A)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## c)\n", + "\n", + "Make a function `swap` that takes a matrix `A` and two integers `i1` and `i2`, and then swaps the `i1` and `i2` rows of `A`. The function shall not return anything, just swaps the rows in `A`.\n", + "\n", + "**Example run**\n", + "```python\n", + "A = np.array([[2.,3.,4.], [5.,-3.,6.]])\n", + "swap(A,0, 1)\n", + "print(A)\n", + " \n", + "#Running the code produces the following output:\n", + "[[ 5. -3. 6.]\n", + " [ 2. 3. 4.]]\n", + "```\n", + "***Hint:***\n", + "you may need to define a temporary variable to save the information in a row before swapping the rows around. E.g., `temp = np.array(A[i1,:])`. Also note that you have to have the `np.array` here even tho `A` is already an np.array.\n", + "\n", + "***Write code in the block below***\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[ 5. -3. 6.]\n", + " [ 2. 3. 4.]]\n" + ] + } + ], + "source": [ + "# SOLUTION\n", + "def swap(A,i1,i2):\n", + " \"\"\"\n", + " Swap row i1 and i2 in matrix A \n", + " \"\"\"\n", + " \n", + " temp = np.array(A[i1,:]) # Save row i1\n", + " A[i1,:] = A[i2,:] # Replace row i1 with row i2\n", + " A[i2,:] = temp # Replace row i2 with row i1\n", + "\n", + "# Test\n", + "A = np.array([[2.,3.,4.], [5.,-3.,6.]]) \n", + "swap(A,0, 1)\n", + "print(A)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## d)\n", + "Write a function `getMaxRow` that takes an augmented matrix `A` (with `n` rows and `n+1` columns) and two integers `i` and `j` that specify the row and column of the pivot element. The function should return the index of the row with the largest element below the pivot row. The function should search down through the $j$'th column starting from the $i$'th row and return the *row index* of the element with maximal absolute value. This corresponds to step 1 above.\n", + "\n", + "**Example run**\n", + "```python\n", + "\n", + "A = np.array([[0.,1.,2.,3.], [4.,5.,6.,7.], [8.,9.,1.,2.]])\n", + "print(getMaxRow(A,0,0)) \n", + " \n", + "#In the 0th column, the row with the largest element is in row 2 so the above code should return:\n", + "#2\n", + "```\n", + "\n", + "***Hint:***\n", + "\n", + "If `A` is an n x (n+1) matrix, you can use the built-in function `n = len(A)` to find n. (this returns the row dimension of `A`, regardless of the column dimension)\n", + "\n", + "The array `A[i:n,j]` returns the elements in the column below and including the pivot element.\n", + "\n", + "***write code in block below***\n" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "2" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# SOLUTION\n", + "def getMaxRow(A,i,j): \n", + " \n", + " \"\"\"\n", + " A = matrix of interst\n", + " i = row index\n", + " j = col index\n", + " \n", + " \"\"\"\n", + " n_rows = len(A) # Get number of rows in A \n", + " pivCol = np.array(A[i:n_rows,j]) # Get all the elements in the pivot column below the pivot row \n", + " maxNum = abs(A[i,j]) # The abs value of the largest element (we start with the pivot element then will update this accordingly)\n", + " maxPos = i # The row index of the max element (which we will update)\n", + "\n", + "\n", + " for k in range(i+1,n_rows): # Search A[i:n,j] for elements larger than the pivot \n", + " \n", + " if abs(A[k,j]) > maxNum: # If A[k,j] is larger than the current maxNum then update maxNum and maxPos\n", + " maxNum = A[k,j]\n", + " maxPos = k\n", + " \n", + " return maxPos # We have searched all of A[i:n,j], return the maxPos\n", + "\n", + "\n", + "#* Test code:\n", + "\n", + "A = np.array([[1.,1.,2.,3.], [4.,5.,6.,7.], [0.,9.,1.,2.]])\n", + "\n", + "getMaxRow(A,0,1)\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## e)\n", + "\n", + "Write a function `rowOps` that takes as arguments a matrix `A` and two index numbers `i` and `j` that specify the pivot element. The function should first check whether `A[i,j]==0`, and return without doing anything if true. Otherwise, the function should add appropriate multiples of `A[i,:]` to each row with index larger than `i` in `A`, such that its entry with index `j` (i.e., in the pivot row) is set to zero. This corresponds to step 3 above.\n", + "\n", + "**example run**\n", + "```python\n", + "#Example 1:\n", + "A = np.array([[0.,1.,1.,3.], [1.,2,3,0], [1.,3.,4.,-2.]])\n", + "rowOps(A,0,0)\n", + "print(A)\n", + " \n", + "#Running the code produces the following output:\n", + "[[ 0. 1. 1. 3.]\n", + " [ 1. 2. 3. 0.]\n", + " [ 1. 3. 4. -2.]]\n", + "#Nothing is changed since A[0,0]=0.\n", + " \n", + " \n", + "#Example 2\n", + "A = np.array([[8.,1.,1.,3.], [2.,6.,3.,0.], [4.,3.,4.,-2.]])\n", + "rowOps(A,0,0)\n", + "print(A)\n", + " \n", + "#Running the code in example 2 produces the following output:\n", + "[[ 8. 1. 1. 3. ]\n", + " [ 0. 5.75 2.75 -0.75]\n", + " [ 0. 2.5 3.5 -3.5 ]]\n", + "```\n", + "***Hint:*** \n", + "\n", + "Remember to use floats in your matrix `A` and not integers otherwise you might get the wrong result as arithmatic with integers are rounded, which is not what we want. This is done by putting a decimal point after each number (that is, we write `2.` instead of `2`).\n", + "\n", + "***Write code in block below*** " + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[ 0. 1. 1. 3.]\n", + " [ 1. 0. 1. -6.]\n", + " [ 1. 0. 1. -11.]]\n", + "[[ 8. 1. 1. 3.]\n", + " [-46. 0. -3. -18.]\n", + " [-20. 0. 1. -11.]]\n" + ] + } + ], + "source": [ + "# SOLUTION\n", + "def rowOps(A,i,j):\n", + " \"\"\"\n", + " Add multiples of the pivot row to the rows below such that the pivot column has only 0 entries after the pivot row.\n", + " \"\"\"\n", + " n = len(A[:,0]) # Number rows\n", + " \n", + " if A[i,j] == 0: # Evaluate the pivot element. Do nothing if = 0 \n", + " return\n", + " else:\n", + " for k in range(i+1,n): # Pluss one to start adding at the next row\n", + " add(A,i,k,-A[k,j]/A[i,j]) # Using previos function to add row multiples\n", + "\n", + "# Test: \n", + "A = np.array([[0.,1.,1.,3.], [1.,2,3,0], [1.,3.,4.,-2.]])\n", + "rowOps(A,0,1)\n", + "print(A)\n", + " \n", + "A = np.array([[8.,1.,1.,3.], [2.,6.,3.,0.], [4.,3.,4.,-2.]])\n", + "rowOps(A,0,1)\n", + "print(A)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "heading_collapsed": true + }, + "source": [ + "#### Hint" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "hidden": true + }, + "source": [ + "Use the add function implemented in b) to add rows\n", + "\n", + "Use a for loop that takes you over all the rows below the pivot row\n", + "\n", + "If the pivot column has index `j` and the pivot row has index `i`, you should add (`-A[k,j]/A[i,j]`) times the pivot row to zero out row number `k`." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## f)\n", + "Now make a function `Gauss` that takes a matrix `A` as and uses `getMaxRow`, `rowOps` and `swap` functions to perform a Gaussian elimination with partial pivoting on `A`.\n", + "\n", + "**Example run:**\n", + "```python\n", + "A = np.array([[0.,1.,2.,3.], [4.,5.,6.,7.], [8.,9.,1.,2.]])\n", + " \n", + "Gauss(A)\n", + "print(A)\n", + " \n", + "#Running the code produces the following output\n", + "[[8. 9. 1. 2. ]\n", + " [0. 1. 2. 3. ]\n", + " [0. 0. 4.5 4.5]]\n", + "```\n", + "\n", + "***Hint***\n", + "\n", + "There are many ways to approach this problem. One possible way is with a for loop: `for i in range(0,n):` where `n` is the row dimension of `A`\n", + "\n", + "You should use your functions `getMaxRows`, `swap` and `rowOps` within the loop. \n", + "\n", + "Make use of the pseudocode (steps 1-5) above.\n", + "\n", + "Every time you use row_ops, increase both the row and column indices of your pivot element.\n", + "\n", + "***write code in block below***" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[8. 9. 1. 2. ]\n", + " [0. 1. 2. 3. ]\n", + " [0. 0. 4.5 4.5]]\n" + ] + } + ], + "source": [ + "# SOLUTION\n", + "def Gauss(A):\n", + " \"\"\"\n", + " Complete code for conducting Gaussian elimination on matrix A.\n", + " \"\"\"\n", + " n_rows = len(A) # Variable to store number of rows\n", + " for i in range(0,n_rows):\n", + " imax = getMaxRow(A,i,i) # Identify where the largest element in the pivot column is\n", + " swap(A,i,imax) # Swap the initial row with the row with the largest element.\n", + " rowOps(A,i,i) # Start to add multiples to make the rest of the pivot elements zero. \n", + "\n", + "# Test: \n", + "A = np.array([[0.,1.,2.,3.], [4.,5.,6.,7.], [8.,9.,1.,2.]])\n", + "Gauss(A)\n", + "print(A)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Bonus question! (optional) \n", + "\n", + "Make a function `backSubs` that takes as input a matrix `A` in *echelon form*, and performs *back substitution*, returning a list containing the solution to the system.\n", + "\n", + "Call the functions `Gauss` and `backSubs` on the matrix from a), and print the results.\n", + "\n", + "**example run**\n", + "```python\n", + "#Example 1\n", + "A = np.array([[1.,1.,1.,3.], [1.,2.,3.,0.], [1.,3.,4.,-2.]])\n", + "Gauss(A)\n", + "x = backSubs(A)\n", + "print(x)\n", + " \n", + "#Running this code produces this output:\n", + "[ 5. -1. -1.]\n", + "```\n", + "**Hint:**\n", + "Remember a sum should be implemented using a `for` loop. For example $$c = \\sum_{k=0}^{10} 2^{-n}$$ is implemented in Python via \n", + "```python\n", + "c = 0\n", + "for k in range(0,10):\n", + " c = c + 2**(-k)\n", + " \n", + "```" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[ 5. -1. -1.]\n" + ] + } + ], + "source": [ + "# SOLUTION\n", + "def backSubs(A):\n", + " \n", + " n_rows = len(A) # Number of rows\n", + " x = np.zeros(n_rows) # Matrix to store our solutions\n", + " for j in reversed(range(0,n_rows)): # Reverse for loop to start at the last row hence backsubstitution. \n", + " sum = 0\n", + " \n", + " for k in range(j+1,n_rows):\n", + " sum = sum + A[j,k]*x[k]\n", + " x[j] = (A[j,-1]-sum)/A[j,j]\n", + " return x\n", + "\n", + "A = np.array([[1.,1.,1.,3.], [1.,2.,3.,0.], [1.,3.,4.,-2.]])\n", + "Gauss(A)\n", + "x = backSubs(A)\n", + "print(x)\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.7" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Solutions/Assignment06/Ideell gasslov - Lf.ipynb b/Solutions/Assignment06/Ideell gasslov - Lf.ipynb new file mode 100644 index 0000000..8ffe81a --- /dev/null +++ b/Solutions/Assignment06/Ideell gasslov - Lf.ipynb @@ -0,0 +1,71 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#Oppgave a\n", + "def p_ig(t, v, n, rgas=8.31452):\n", + " p = (n*rgas*t)/v\n", + " return p\n", + " \n", + " \n", + "#Oppgave b\n", + "def p_ig_pptable(vols,temps, n):\n", + " tab = []\n", + " for i in range(len(vols)):\n", + " vol = vols[i]\n", + " tab.append([vol])\n", + " for j in range(len(temps)):\n", + " temp = temps[j]\n", + " p = p_ig(temp, vol, n)\n", + " tab[i].append(p)\n", + " return tab\n", + " \n", + " \n", + "#Oppgave c\n", + "nv = 10 # number of volumes (rows) [-]\n", + "nt = 3 # number of temperatures (columns) [-]\n", + " \n", + "n = 10 # [mol]\n", + "t = [100 + float(j)*200 for j in range(nt)] # [K]\n", + "v = [10**(-float(i)/nv) for i in range(1, nv+1)]\n", + " \n", + "table = p_ig_pptable(v,t,n)\n", + " \n", + "print(\"| Volum (m^3)\".ljust(21),\"|\",(\"Temp. = \"+str(t[0])+\"K\").ljust(19),\"|\",(\"Temp. = \"+str(t[1])+\"K\").ljust(19),\"|\",(\"Temp. = \"+str(t[2])+\"K\").ljust(19),\"|\")\n", + "print(\"-\"*89)\n", + " \n", + "#SKRIV DIN KODE HER\n", + "for lst in table:\n", + " print('|',end=' ')\n", + " for el in lst:\n", + " print(str(el).ljust(19),\"|\",end =' ')\n", + " print(\"\\n\")" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.16" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Solutions/Assignment06/Innebygde funksjoner og lister - Lf.ipynb b/Solutions/Assignment06/Innebygde funksjoner og lister - Lf.ipynb new file mode 100644 index 0000000..89055d7 --- /dev/null +++ b/Solutions/Assignment06/Innebygde funksjoner og lister - Lf.ipynb @@ -0,0 +1,63 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# a)\n", + "import random\n", + "random_numbers = [random.randint(1,10) for i in range(100)]\n", + " \n", + "# b)\n", + "print('Number of 2s:', random_numbers.count(2))\n", + " \n", + " \n", + "# c)\n", + "print('Sum of numbers:', sum(random_numbers))\n", + " \n", + " \n", + "# d)\n", + "random_numbers.sort()\n", + "print('Numbers sorted:', random_numbers)\n", + " \n", + " \n", + "# e)\n", + "count = 0\n", + "most = -1\n", + "for i in range(1,11):\n", + " if random_numbers.count(i) > count:\n", + " count = random_numbers.count(i)\n", + " most = i\n", + "print ('There are most of number:', most)\n", + " \n", + " \n", + "# f)\n", + "random_numbers.reverse()\n", + "print('Numbers reversed:', random_numbers)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.16" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Solutions/Assignment06/Interpolation_assignment__new__with_solutions_.ipynb b/Solutions/Assignment06/Interpolation_assignment__new__with_solutions_.ipynb new file mode 100644 index 0000000..4a54a00 --- /dev/null +++ b/Solutions/Assignment06/Interpolation_assignment__new__with_solutions_.ipynb @@ -0,0 +1,427 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Interpolation\n", + "\n", + "In this exercise we will look at one dimensional interpolation as a way to approximate new data points from a discrete set of known data.\n", + "\n", + "## Q1) Linear interpolation\n", + "\n", + "The first method we will implement is linear interpolation. Let's assume as an example that we have a set of temperature measurements taken at different times. If we want to approximate the temperature between two of the measured times, one way to do that would be to draw a straight line between the two known measurements and use that as an approximation. We can think of a measurement as a number $y_i$ taken at time $x_i$. Therefore, two measurements can be described by the pairs $(x_0, y_0)$ and $(x_1, y_1)$. \n", + "\n", + "Recall that the linear interpolation polynomial $f(x)$ that passes through two points $(x_0,y_0)$ and $(x_1,y_1)$ is given by \n", + "\n", + "$$f(x) = y_0 \\frac{x-x_1}{x_0-x_1}+y_1 \\frac{x-x_0}{x_1-x_0}$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## a)\n", + "\n", + "Complete the below function that accepts two lists, $x = [x_0,x_1]$ and $y = [y_0,y_1]$, and a float $X$. The function should return $f(X)$, that is, the linear interpolation polynomial evaluated at $X$. \n", + "\n", + "The code below should print 18.4 if you have written the function correctly.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "ename": "NameError", + "evalue": "name 'interpolated_y_value' is not defined", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m<ipython-input-1-3d0cb79724b2>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 11\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 12\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 13\u001b[0;31m \u001b[0mY\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mlinear_interpolation\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx_data\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my_data\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mX\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 14\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m<ipython-input-1-3d0cb79724b2>\u001b[0m in \u001b[0;36mlinear_interpolation\u001b[0;34m(x, y, X)\u001b[0m\n\u001b[1;32m 8\u001b[0m \u001b[0;31m# write ya code here!\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 9\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 10\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0minterpolated_y_value\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 11\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 12\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mNameError\u001b[0m: name 'interpolated_y_value' is not defined" + ] + } + ], + "source": [ + "x_data = [0.0, 2.0]\n", + "y_data = [22.3, 14.5]\n", + "X = 1.0\n", + "\n", + "def linear_interpolation(x, y, X):\n", + " \"\"\"This function should accept x and y (lists of length 2) and X (float). \n", + " It should return the linear interpolation polynomial at X \"\"\"\n", + " # write ya code here! \n", + " \n", + " return interpolated_y_value\n", + "\n", + "\n", + "Y = linear_interpolation(x_data, y_data, X)\n", + "print(Y)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "18.4\n" + ] + } + ], + "source": [ + "# solution:\n", + "x_data = [0.0 , 2.0]\n", + "y_data = [22.3, 14.5]\n", + "X = 1.0\n", + "\n", + "def linear_interpolation(x, y, X):\n", + " \"\"\"This function should accept x and y (lists of length 2) and X (float). \n", + " It should return the linear interpolation polynomial at X \"\"\"\n", + " Y = y[0]*(X-x[1])/(x[0]-x[1]) + y[1]*(X-x[0])/(x[1]-x[0])\n", + " return Y\n", + "\n", + "\n", + "Y = linear_interpolation(x_data, y_data, X)\n", + "print(Y)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## b) \n", + "Use the linear interpolation function to interpolate the data $(x_0,y_0) = (0,11)$ and $(x_1,y_1) = (2,15)$ onto the points $X = [0,0.5,1,1.5,2]$. Save these values into an array $Y$. That is, create the array $Y = [f(0),f(0.5),f(1),f(1.5),f(2)]$, where $f(x)$ is the linear interpolation polynomial that interpolates the points $(x_0,y_0)$ and $(x_1,y_1)$. \n", + "\n", + "Plot the points $(x_0,y_0)$ and $(x_1,y_1)$ using red dots and $X$ and $Y$ using blue crosses. \n", + "\n", + "Dont forget to import the plotting library:\n", + "\n", + " import matplotlib.pyplot as plt\n", + "\n", + "Then you can use the function \n", + "\n", + " plt.plot()" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD4CAYAAADiry33AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAWHElEQVR4nO3df4wc5X3H8fcHHEBQREzvkgC2OYMQjZNiQ/dIE6LU2xIwbmryQzlBqeo0WK7dULWqUpJg2U5sQSOjCtQGXeo4lhvJMbmmpaIEEuyylpUSh1sj/yL8cgw2FxN8iQk0SpQU+PaPmQvr9e7d3t7u/Xj8eUmrnXnmmZ3vzY0/N35md0cRgZmZpeuUiS7AzMzay0FvZpY4B72ZWeIc9GZmiXPQm5klbtpEF1BLR0dHdHV1TXQZZmZTxq5du34SEZ21lk3KoO/q6qJcLk90GWZmU4akQ/WWeejGzCxxDnozs8Q56M3MEuegNzNLnIPezCxxIwa9pI2SjkraX9H2eUk/krQ7fyyss+4CSU9LOiDps60s3MwsBevWQWnFNujqglNOga4uSiu2sW5d67bRyBn9JmBBjfa7ImJe/niweqGkU4F7gOuAOcCNkuaMpVgzs9R0v7KNnj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D1EfHTofaK/XUUuI/WDVmOKCJejYif59MPAm+R1MEk2F+54Y6vtuwvSW8hC/nNEfEfNbq07xhrx4WHNlzImEZ2AWI2b17AeVdVn09x/MXYvnz6XRx/MfYgrbsY20hdl5NdfLqkqn06cHo+3QE8S4suSjVY13kV0x8BdsabF36ey+ubnk+fO1515f0uJbswpvHYXxXb6KL+xcU/5vgLZY+1e381WNcssutO76tqPws4u2L6UWDBONb1jqHfH1lgHs73XUPHQLvqypcPnQSeNV77K//ZvwbcPUyfth1jLdu57X6QXZF+hiw0V+Rta8jOkgHOAP4tP+gfAy6qWHdFvt7TwHXjXNc2spuq784f9+ft7wP25Qf6PuDmca7rH4An8u2XgN+pWPeT+X48APzFeNaVz38e+GLVeu3eX1uAF4H/IzuDuhlYBizLlwu4J697H1AYp/01Ul0bgJcrjq9y3n5Rvq/25L/nFeNc1y0Vx9dOKv4Q1ToGxquuvM8nyN6gUbleu/fX+8mGW/ZW/K4Wjtcx5q9AMDNL3FQZozczsyY56M3MEuegNzNLnIPezCxxDnozs8Q56M3MEuegNzNL3P8DzUpOLoJDIAoAAAAASUVORK5CYII=\n", + "text/plain": [ + "<Figure size 432x288 with 1 Axes>" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "# solution \n", + "\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "\n", + "x = [0, 2]\n", + "y = [11, 15]\n", + "\n", + "X = [0,0.5,1,1.5,2]\n", + "Y = [linear_interpolation(x, y, ix) for ix in X]\n", + "\n", + "plt.plot(x,y,'ro')\n", + "plt.plot(X,Y,'bx')\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Q2) Quadratic interpolation\n", + "\n", + "Linear interpolation is relatively simple and quick to implement, but it is not always a good fit for the data we are looking at. It is often more realistic that the measurements would vary more smoothly. \n", + "\n", + "For a quadraic polynomial, we require 3 data points to be specified: $(x_0,y_0)$, $(x_1,y_1)$ and $(x_2,y_2)$. A quadratic polynomial is given by \n", + "\n", + "$$f(x) = k_0 + k_1 x + k_2 x^2$$\n", + "\n", + "where $k_0,k_1, k_2$ are constants. We need to choose the $k_i$'s such that $f(x_i)=y_i$ for $i=1,2,3$.\n", + "\n", + "The above form of the function $f(x)$ is not the most practical for interpolation, if we instead write our quadratic function on the form\n", + "\n", + "$$f(x) = y_0 \\frac{(x-x_1)(x-x_2)}{(x_0-x_1)(x_0-x_2)} +y_1 \\frac{(x-x_2)(x-x_0)}{(x_1-x_0)(x_1-x_2)} + y_2 \\frac{(x-x_0)(x-x_1)}{(x_2-x_0)(x_2-x_1)} $$\n", + "\n", + "where $x_0$, $x_1$ and $x_2$ are the x-values used to interpolate, and $y_0$, $y_1$, $y_2$ are the corresponding y-values. This is called the Lagrange form of the interpolating polynomial. \n", + "\n", + "Note that we need 3 points to do quadratic interpolation, where as linear interpolation only requires 2 points.\n", + "\n", + "## a)\n", + "Complete the below function quadratic_interpolation(x, y, X) that accepts two lists, $x$ and $y$, and a point $X$ and returns the quadratic interpolating polynomial evaluated at $X$, $f(X)$. \n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "x_data = [0.0, 2.0, 4.0]\n", + "y_data = [22.3, 14.5, 19.5]\n", + "X = 1.0\n", + "\n", + "def quadratic_interpolation(x, y, X):\n", + " \"\"\"This function should accept x and y (lists of length 3) and X (float). \n", + " It should return the quadratic interpolation polynomial at X \"\"\"\n", + " # write ya code here! \n", + " \n", + " return interpolated_y_value\n", + "\n", + "Y = quadratic_interpolation(x_data, y_data, X)\n", + "print(Y)" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "16.8\n" + ] + } + ], + "source": [ + "# solution\n", + "x_data = [0.0, 2.0, 4.0]\n", + "y_data = [22.3, 14.5, 19.5]\n", + "X = 1.0\n", + "\n", + "def quadratic_interpolation(x, y, X):\n", + " \"\"\"This function should accept x and y (lists of length 3) and X (float). \n", + " It should return the quadratic interpolation polynomial at X \"\"\"\n", + " Y = y[0]*(X-x[1])/(x[0]-x[1])*(X-x[2])/(x[0]-x[2]) + \\\n", + " y[1]*(X-x[2])/(x[1]-x[2])*(X-x[0])/(x[1]-x[0]) + \\\n", + " y[2]*(X-x[0])/(x[2]-x[0])*(X-x[1])/(x[2]-x[1])\n", + " return Y\n", + "\n", + "Y = quadratic_interpolation(x_data, y_data, X)\n", + "print(Y)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## b)\n", + "Use the quadratic interpolation function to interpolate the data $(x_0,y_0) = (0,11)$ and $(x_1,y_1) = (2,15)$ onto the points $X = [0,0.5,1,1.5,2,2.5,3,3.5,4]$. Save these values into an array $Y$. That is, create the array $Y = [f(0),f(0.5),f(1),f(1.5),f(2),f(2.5),f(3),f(3.5),f(4)]$, where $f(x)$ is the quadratic interpolation polynomial that interpolates the points $(x_0,y_0)$, $(x_1,y_1)$ and $(x_2,y_2)$. \n", + "\n", + "Plot the points $(x_0,y_0)$, $(x_1,y_1)$ and $(x_2,y_2)$ using red dots and $X$ and $Y$ using blue crosses. " + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAATM0lEQVR4nO3df4zk9X3f8ecLg91KONjtbVoEHEur2Irj+rCzh2itJDc2alESmTY/tkbExY3ptVunNakV6kDvCIeEoq1jNT+kcy9AbbdX6m2ME+LaSrlkKLJkk92jhwEdcdziu16NfOugHrbSxiJ+94+ZM8u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I6vgi8LsnFWyDXVFTVM1X1aPf2N4HjwCU9q018nw2Ya+K6++Bb3bsXdD96z3qY+ONxwFxTkeRS4MeAjS7rNNL9tdUK/BLgf625f4qX/iJ/d52qeh44A/zlLZAL4Ce7f3b/VpLLxpxpEIPmnoa/2f0T+HNJfmDSG+/+6fpWOkdva011n71MLpjCPutOBxwDTgMPVtWG+2uCj8dBcsF0Ho//BrgF+M4Gy0e6v7Zaga/3TNT7zDrIOqM2yDZ/F5itqrcAR3jhWXaaprGvBvEonf/tsAv4deC3J7nxJBcCnwJurqrnehev8yUT2Wd9ck1ln1XVn1fVlcClwFVJ3tyzylT21wC5Jv54TPLjwOmqOvpyq60zNvT+2moFfgpY+0x5KfC1jdZJcj5wEeP/c71vrqr6k6r6s+7d3wR+cMyZBjHI/py4qnru7J/AVfVZ4IIkOyax7SQX0CnJw1V1/zqrTGWf9cs1zX3W3eb/AR4Cru1ZNI3HY99cU3o8vh14V5Kv0plmfUeS/9Czzkj311Yr8GXg+5JckeTVdCb5H+hZ5wHgxu7tnwL+oLqvCEwzV8886bvozGNO2wPAP+ieWXE1cKaqnpl2qCR/9ey8X5Kr6Pwe/skEthvgHuB4VX1kg9Umvs8GyTWNfZZkJsnrurf/InAN8FTPahN/PA6SaxqPx6r6xaq6tKpm6XTEH1TVz/SsNtL9taWuSl9Vzyf5OeD36Jz5cW9VPZnkALBSVQ/Q+UX/90m+QueZ691bJNc/T/Iu4PlurveOO1eS++icnbAjySngdjov6FBVHwU+S+esiq8Afwr8w3FnGjDXTwELSZ4H/i/w7gk8CUPnCOk9wOPd+VOAW4Gda7JNY58Nkmsa++xi4ONJXkXnCWOpqj4z7cfjgLkm/njcyDj3l2+ll6SG2mpTKJKkAVngktRQFrgkNZQFLkkNZYFLUkNZ4JLUUBa4JDXU/wd9U+/7VOGM5QAAAABJRU5ErkJggg==\n", + "text/plain": [ + "<Figure size 432x288 with 1 Axes>" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "# solution\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "\n", + "x = [0.0, 2.0, 4.0]\n", + "y = [22.3, 14.5, 19.5]\n", + "\n", + "X = [0,0.5,1,1.5,2,2.5,3,3.5,4]\n", + "Y = [quadratic_interpolation(x, y, ix) for ix in X]\n", + "\n", + "plt.plot(x,y,'ro')\n", + "plt.plot(X,Y,'bx')\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Q3) Higher order interpolation (optional)\n", + "\n", + "\n", + "In the previous two questions, we contructed a degree $p$ polynomial called $f(x)$ that interpolates a set of $p+1$ data points, which we denoted by $\\{(x_i,y_i)\\}_{i=0}^{p}$. We then plotted some values of the polynomial in the interpolation interval. We did this for $p=1$ and $p=2$. Now we will extend this to higher $p$. The general formula for an interpolation polynomial of degree $p$ is given by the following, written in the Lagrange polynomial basis \n", + "\\begin{equation}\n", + "\tf(x) = \\sum_{i=0}^{p}\\prod_{j=0,\\,j\\ne i}^{p}\\frac{x-x_j}{x_i-x_j},\n", + "\\end{equation}\n", + "\n", + "Here, $\\prod_{j=0,\\,j\\ne i}^{p}$, means take the product for $j=0,1,2,...,i-1,i+1,...,p$. That is, we exclude the $i=j$ term.\n", + "\n", + "Note that by setting $p=1$ and $p=2$ in the above formula, we get the linear and quadratic interpolation polynomials from the previous 2 questions. \n", + "\n", + "## a) \n", + "Complete the function lagrange_interp, below, such that it accepts two lists $x$ and $y$ of length $p+1$ and returns the above degree $p$ interpolation polynomial $f(X)$ \n", + "\n", + "The code below only requires you to fill out the function lagrange_interp(x,y,X). Once you have done this, executing the cell will produce a figure with red dots (the data points) and a blue curve that should interpolate the data. \n", + "\n", + "## b) \n", + "Experiment with this code by increasing $p$. E.g., try $p = 5,6,...,15$. Describe what is happening to the interpolation polynomial at the boundary. Hint: This is called the Runge phenomenon. \n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "\n", + "def lagrange_interp(x,y,X):\n", + " \"\"\"This function should accept x and y (lists of length p+1) and X (float). \n", + " It should return the degree p lagrange interpolation polynomial at X \"\"\"\n", + " # write ya code here! \n", + " return Y\n", + "\n", + "p = 10 # degree of lagrange polynomial to plot\n", + "\n", + "# create some data to test the function on \n", + "x = np.linspace(-5,5,p+1)\n", + "y = np.exp(-x**2)\n", + "\n", + "# create the array X, which is where we choose to evaluate the lagrange polynomials on\n", + "X = np.linspace(x[0],x[-1],100)\n", + "# evaluate the lagrange polynomial function on the grid $X$\n", + "Y = [lagrange_interp(x, y, ix) for ix in X]\n", + "\n", + "plt.plot(x,y,'ro')\n", + "plt.plot(X,Y,'b-x')\n", + "plt.show()" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD4CAYAAADvsV2wAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO2deXhU5fXHPycJYRMQhOKCLFbUUlpFE8WdERdAFNxQShHcqPuCgFDcraKIYhWrUtGKUBFFFi2bkMG6m/BTqbtoXRAVLIIoItv5/XHmOkNMQkJmn/N5nvvM3Ds3930n877nnnve73teUVUcx3Gc7Ccv1RVwHMdxkoMbfMdxnBzBDb7jOE6O4AbfcRwnR3CD7ziOkyMUpLoCldG8eXNt27ZtqqvhOI6TUSxevPgbVW1R0Wdpa/Dbtm1LWVlZqqvhOI6TUYjIp5V95iEdx3GcHMENvuM4To7gBt9xHCdHcIPvOI6TI7jBdxzHyRHiYvBF5CERWSEib1XyuYjI3SKyVESWiMj+8SjXcZLB6NEQDkfe932d8M59CctRjG46CiZPJhy2cxwn3YmXh/8PoFsVn3c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FXtmeq6xAOP4TvxYhzQCHhWRN4QkftTXaF4ExmUvhiYhw1eTs1mYx/hUKA/cFTkd30j4vk6GYh7+I7jODmCe/iO4zg5ght8x3GcHMENvuM4To7gBt9xHCdHcIPvOI6TI7jBdxzHyRHc4DuO4+QI/w+NotkQALSpQQAAAABJRU5ErkJggg==\n", + "text/plain": [ + "<Figure size 432x288 with 1 Axes>" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "# solution\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "\n", + "def lagrange_interp(x,y,X):\n", + " #\n", + " Y = 0\n", + " for i in range(len(x)):\n", + " l = 1\n", + " for j in range(len(x)):\n", + " if not j==i:\n", + " l = l*(X-x[j])/(x[i]-x[j])\n", + " Y = Y + y[i]*l\n", + " return Y\n", + "\n", + "x = np.linspace(-5,5,5)\n", + "y = np.exp(-x**2)\n", + "\n", + "X = np.linspace(x[0],x[-1],100)\n", + "Y = [lagrange_interp(x, y, ix) for ix in X]\n", + "\n", + "plt.plot(x,y,'ro')\n", + "plt.plot(X,Y,'b-x')\n", + "plt.show()\n", + "\n", + "# solution\n", + "# as the degree of the polynomial increases, the runge phenomenon says \n", + "# that the error at the boundary get very bad, due to the increasing values of the derivatives, which dominate \n", + "# the error. " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.6" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/Solutions/Assignment06/Krypto - Lf.ipynb b/Solutions/Assignment06/Krypto - Lf.ipynb new file mode 100644 index 0000000..f48a1cd --- /dev/null +++ b/Solutions/Assignment06/Krypto - Lf.ipynb @@ -0,0 +1,94 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import binascii\n", + "import random\n", + " \n", + "def toHex(word):\n", + " return int(str(binascii.hexlify(word), 'ascii'), 16)\n", + " \n", + "def toString(word):\n", + " return str(binascii.unhexlify(hex(word)[2:]), 'ascii')\n", + " \n", + "def encrypt(message,key):\n", + " message = bytes(message, encoding = 'ascii')\n", + " key = bytes(key, encoding = 'ascii')\n", + " msg = toHex(message)\n", + " key = toHex(key)\n", + " code = msg ^ key\n", + " return code\n", + " \n", + "def decrypt(code,key):\n", + " key = bytes(key, encoding = 'ascii')\n", + " key = toHex(key)\n", + " msg = code ^ key\n", + " return toString(msg)\n", + " \n", + "def main():\n", + " key = 'abc'\n", + " msg = 'hei'\n", + " # Oppgave a\n", + " code = encrypt(msg, key)\n", + " print ('Krypto:', code)\n", + " # Oppgave b\n", + " message = decrypt(code, key)\n", + " print('Melding:', message)\n", + " # --------------------\n", + " # Oppgave c\n", + " msg = input('Hva er meldingen? ')\n", + " key = ''\n", + " \"\"\"for ch in msg: #Eventuell måte å få tilfeldig nøkkel på\n", + " k = random.randint(65,90)\n", + " k = toString(k)\n", + " key += k\"\"\"\n", + " charlst = list(msg)\n", + " random.shuffle(charlst)\n", + " key = ''.join(charlst)\n", + " code = encrypt(msg,key)\n", + " print(\"Krypto:\",code)\n", + " msg = decrypt(code,key)\n", + " print(\"Melding:\",msg)\n", + " \n", + "main()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "d) Sjekk \"Reused Key Attack\": https://en.wikipedia.org/wiki/Stream_cipher_attack\n", + "\n", + "[Ved å ta XOR på to meldinger M1 = A XOR C og M2 = B XOR C som er kryptert med samme nøkkel C finner man D = A XOR B.](https://en.wikipedia.org/wiki/Stream_cipher_attack)\n", + "\n", + "Deretter kan man ved hjelp av en ordbok teste alle mulige kombinasjoner av tilsvarende lange ord, hvilke to ord som sammen gir D. Med moderne datamaskiner er dette gjort på få sekunder. \n", + "\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.16" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Solutions/Assignment06/Litt sjakk - lf.ipynb b/Solutions/Assignment06/Litt sjakk - lf.ipynb new file mode 100644 index 0000000..149b78f --- /dev/null +++ b/Solutions/Assignment06/Litt sjakk - lf.ipynb @@ -0,0 +1,107 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#a)\n", + "\n", + "def make_board (board_string):\n", + " # alternativ løsning som løser oppgaven på én linje:\n", + " # board = [[board_string_1[5*x + y] if board_string_1[5*x + y] != '.' else None for y in range(5)] for x in range(5)]\n", + " board = []\n", + " for i in range(5):\n", + " board.append([])\n", + " for j in range(5):\n", + " symbol = board_string[5*i + j]\n", + " if symbol != '.':\n", + " board[i].append(symbol)\n", + " else:\n", + " board[i].append(None)\n", + " # alternativ til if-else:\n", + " # board[i][j] = symbol if symbol != '.' else None\n", + " return board\n", + " \n", + "\n", + "#b)\n", + "\n", + "def get_piece (board, x, y):\n", + " return board[5 - y][x - 1]\n", + " \n", + "\n", + "#c)\n", + "\n", + "def is_white(piece):\n", + " if isinstance(piece, str):\n", + " return piece.isupper()\n", + " if piece is None:\n", + " return False\n", + " return False\n", + " \n", + " \n", + "def same_color(piece1, piece2):\n", + " if piece1 is None or piece2 is None:\n", + " return True\n", + " if is_white(piece1) and not is_white(piece2):\n", + " return False\n", + " if not is_white(piece1) and is_white(piece2):\n", + " return False\n", + " return True\n", + " \n", + " \n", + "def get_legal_moves(board, x, y):\n", + " boardsize = len(board)\n", + " piece = get_piece(board, x, y)\n", + " hvit = is_white(piece)\n", + " sign = 1 if hvit else -1\n", + " valid_moves = []\n", + " if piece in [\"p\", \"P\"]:\n", + " # sjekke det er tomt rett foran, og at bonden ikke har kommet helt over\n", + " if not get_piece(board, x, y + sign) and y != (boardsize / 2) - (boardsize / 2) * sign:\n", + " valid_moves.append((x, y + sign))\n", + " # sjekke om bonden er i startposisjon, og at det er tomt TO ruter foran\n", + " if ((y == 2 and hvit) or (y == boardsize - 1 and not hvit)) and get_piece(board, x, y + 2 * sign) is None:\n", + " valid_moves.append((x, y + 2 * sign))\n", + " # sjekke om bonden kan slå foran til høyre og venstre\n", + " if x == 1:\n", + " right_piece = get_piece(board, x + 1, y + 1 * sign)\n", + " left_piece = None\n", + " elif x == len(board):\n", + " right_piece = None\n", + " left_piece = get_piece(board, x - 1, y + 1 * sign)\n", + " else:\n", + " right_piece = get_piece(board, x + 1, y + 1 * sign)\n", + " left_piece = get_piece(board, x - 1, y + 1 * sign)\n", + " if not same_color(piece, left_piece) and left_piece is not None:\n", + " valid_moves.append((x - 1, y + 1 * sign))\n", + " if not same_color(piece, right_piece) and right_piece is not None:\n", + " valid_moves.append((x + 1, y + 1 * sign))\n", + " \n", + " return valid_moves" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.16" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Solutions/Assignment06/Sammenhengende tallrekke - Lf.ipynb b/Solutions/Assignment06/Sammenhengende tallrekke - Lf.ipynb new file mode 100644 index 0000000..f88563f --- /dev/null +++ b/Solutions/Assignment06/Sammenhengende tallrekke - Lf.ipynb @@ -0,0 +1,82 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#a)\n", + "\n", + "def randList(lenght,a,b):\n", + " import random\n", + " return [random.randint(a,b) for x in range(0,length)]\n", + "\n", + "#b)\n", + "\n", + " def compareLists(listA, listB):\n", + " common = []\n", + " for a in listA:\n", + " if a in listB and a not in common:\n", + " common.append(a)\n", + " return common\n", + " \n", + "# alternativ løsning vha. set:\n", + "def compareLists1(listA, listB):\n", + " return list(set(listA).intersection(set(listB)))\n", + "\n", + "#c)\n", + "\n", + "def multiCompList(lists):\n", + " common = compareLists(lists[0], lists[1])\n", + " for r in range(2,len(lists)):\n", + " common = compareLists(common, lists[r])\n", + " return common\n", + "\n", + "#d)\n", + "\n", + "def longestEven(list):\n", + " ant = 0\n", + " tempAnt = 0\n", + " index = 0\n", + " tempIndex = 0\n", + " tempEven = 0\n", + " for i in range(len(liste)):\n", + " if (liste[i] % 2 == 0):\n", + " if tempAnt == 0:\n", + " tempIndex = i\n", + " tempAnt +=1\n", + " tempEven +=1\n", + " else:\n", + " if tempAnt > ant:\n", + " ant = tempAnt\n", + " index = tempIndex\n", + " tempAnt = 0\n", + " if tempEven == len(liste):\n", + " ant = len(liste)\n", + " return index, ant" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.16" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Solutions/Assignment06/Slicing av strenger - lf.ipynb b/Solutions/Assignment06/Slicing av strenger - lf.ipynb new file mode 100644 index 0000000..32b96ae --- /dev/null +++ b/Solutions/Assignment06/Slicing av strenger - lf.ipynb @@ -0,0 +1,56 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "#Oppgave a\n", + "def newString(streng):\n", + " return streng[::4]\n", + " \n", + "#Oppgave b\n", + "def newString(liste):\n", + " s = \"\"\n", + " for st in liste:\n", + " s += st[-2:]\n", + " return s" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "c) Kodesnutt 2 er korrekt, og vil skrive ut 'Cake'. Dette fordi man kan bruke negative verdier for å vise til plassering i en streng. I tillegg, selv om 100 er mye større enn lengden av strengen, vil Python bruke lengden til strengen som end istedet for å utløse et unntak.\n", + "\n", + "Feilen i kodesnutt 1: streng[7:] = \"Cupcake\"\n", + "Prøver her å endre på strengen, noe som ikke er mulig siden strenger er ikke-muterbare.\n", + "\n", + "Feilen i kodesnutt 3: streng = streng[ ]\n", + "Dette vil gi syntaksfeil." + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.16" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Solutions/Assignment06/Sortering - Lf.ipynb b/Solutions/Assignment06/Sortering - Lf.ipynb new file mode 100644 index 0000000..4a25125 --- /dev/null +++ b/Solutions/Assignment06/Sortering - Lf.ipynb @@ -0,0 +1,64 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#a)\n", + "\n", + "def bubbleSort(liste):\n", + " unsorted = 1\n", + " while unsorted:\n", + " unsorted = 0\n", + " for x in range(0, len(liste)-1):\n", + " if (liste[x] > liste[x+1]):\n", + " liste[x], liste[x+1] = liste[x+1], liste[x]\n", + " unsorted = 1\n", + " return liste\n", + " \n", + "liste = [9,1,34,7,2,3,45,6,78,56,36,65,33,21,23,34,45,6]\n", + "print(bubbleSort(liste))\n", + "\n", + "#b)\n", + "\n", + "def selectionSort(unSorted):\n", + " sorted = [0 for x in range(0,len(unSorted))]\n", + " for x in range(1, len(unSorted)+1):\n", + " pos = unSorted.index(max(unSorted))\n", + " sorted[-x] = unSorted[pos]\n", + " unSorted.pop(pos)\n", + " return sorted\n", + " \n", + " \n", + "liste = [9,1,34,7,2,3,45,6,78,56,36,65,33,21,23,34,45,6]\n", + "print(selectionSort(liste))\n", + "\n", + "#c\n", + "#Selectionsort er best. Den utfører gjennomsnittlig færre operasjoner enn bubblesort selv om de er asymptotisk like gode." + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.16" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Solutions/Assignment06/Strengemanipulasjon - Lf.ipynb b/Solutions/Assignment06/Strengemanipulasjon - Lf.ipynb new file mode 100644 index 0000000..fb5e97f --- /dev/null +++ b/Solutions/Assignment06/Strengemanipulasjon - Lf.ipynb @@ -0,0 +1,61 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#Oppgave a\n", + "def substrings(str1,str2):\n", + " inds = []\n", + " i = 0\n", + " str3 = str2\n", + " while str3.lower().find(str1.lower())>-1:\n", + " i += str3.lower().find(str1.lower())\n", + " inds.append(i)\n", + " str3 = str2[i+1:]\n", + " i += 1\n", + " return inds\n", + " \n", + " \n", + "#Oppgave b\n", + "def change_substrings(str1,str2,str3):\n", + " indexes = substrings(str1,str2)\n", + " newString = \"\"\n", + " l = len(str1)\n", + " i = 0\n", + " for ind in indexes:\n", + " ind -= i\n", + " if ind<0:\n", + " newString += str2[:ind+l-1]+str3\n", + " else:\n", + " newString += str2[:ind]+str3\n", + " str2 = str2[ind+l:]\n", + " i += l+ind\n", + " return newString+str2" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.16" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Solutions/Assignment06/Strenger og konkatinering - Lf.ipynb b/Solutions/Assignment06/Strenger og konkatinering - Lf.ipynb new file mode 100644 index 0000000..76d64de --- /dev/null +++ b/Solutions/Assignment06/Strenger og konkatinering - Lf.ipynb @@ -0,0 +1,51 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#Oppgave a\n", + "def konkatinering(s1,s2):\n", + " return s1 + ' ' + s2\n", + " \n", + "#Oppgave b\n", + "def list2string(liste):\n", + " st = \"\"\n", + " for s in liste:\n", + " st += s\n", + " return st\n", + " \n", + "#Oppgave c\n", + "def firstLetter(liste):\n", + " for s in liste:\n", + " print(s[0])\n", + " \n", + "#oppgave d\n", + "#Kodesnutten vil skrive ut: bobbob" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.16" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Solutions/Assignment06/Strenghaandtering - Lf.ipynb b/Solutions/Assignment06/Strenghaandtering - Lf.ipynb new file mode 100644 index 0000000..14a2a64 --- /dev/null +++ b/Solutions/Assignment06/Strenghaandtering - Lf.ipynb @@ -0,0 +1,72 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# a)\n", + "def check_equal(str1, str2):\n", + " if len(str1) == len(str2):\n", + " for i in range(len(str1)):\n", + " if str1[i] != str2[i]:\n", + " return False\n", + " return True\n", + " return False\n", + " \n", + "#alternativ a)\n", + "def check_equal(str1, str2):\n", + " return str1 == str2\n", + " \n", + "# b)\n", + "def reversed_word(string):\n", + " reversed = ''\n", + " for i in range(len(string) - 1, -1, -1):\n", + " reversed += string[i]\n", + " return reversed\n", + " \n", + "# c)\n", + "def check_palindrome(string):\n", + " return string == reversed_word(string)\n", + " \n", + "#alternativ c)\n", + "def check_palindrome(string):\n", + " return check_equal(string,reversed_word(string))\n", + " \n", + "# d)\n", + "def contains_string(str1, str2):\n", + " ind = -1\n", + " for x in range(len(str1)):\n", + " if str1[x:(len(str2) + x)] == str2:\n", + " ind = x\n", + " return ind\n", + " \n", + "#alternativ d)\n", + "def contains_string(str1,str2):\n", + " return str1.find(str2)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.16" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Solutions/Assignment06/Tekstbehandling - Lf.ipynb b/Solutions/Assignment06/Tekstbehandling - Lf.ipynb new file mode 100644 index 0000000..9265ac3 --- /dev/null +++ b/Solutions/Assignment06/Tekstbehandling - Lf.ipynb @@ -0,0 +1,49 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#Oppgave a\n", + "def func(s):\n", + " return s.upper().strip()\n", + " \n", + "#Oppgave b\n", + "def func(s, c):\n", + " return s.split(c)\n", + " \n", + "#Oppgave d\n", + "def zZz():\n", + " for i in range(1,8):\n", + " print('Z'*i)\n", + " for i in range(8,0,-1):\n", + " print('Z'*i)\n", + " \n", + "#c) The more you weigh, the harder you are to kidnap. Stay safe. Eat cake." + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.16" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} -- GitLab