diff --git a/notebooks/appA.ipynb b/notebooks/appA.ipynb index 0b5d4d70..50e14a25 100644 --- a/notebooks/appA.ipynb +++ b/notebooks/appA.ipynb @@ -666,7 +666,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "**Exercise:** Go back and run `run_timing_test` with a larger value of `max_time` and see if the run time converges to the line with slope 2. Just be careful not to make `max_time` to big." + "**Exercise:** Go back and run `run_timing_test` with a larger value of `max_time` and see if the run time converges to the line with slope 2. Just be careful not to make `max_time` too big." ] }, { diff --git a/notebooks/chap02.ipynb b/notebooks/chap02.ipynb index 1ef73a29..a9dfdfb6 100644 --- a/notebooks/chap02.ipynb +++ b/notebooks/chap02.ipynb @@ -156,7 +156,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We can use the keys in `pos` to add nodes to the graph." + "We can use the keys in `positions` to add nodes to the graph." ] }, { @@ -332,7 +332,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The `neighbors` method the neighbors for a given node." + "The `neighbors` method returns the neighbors for a given node." ] }, { @@ -348,7 +348,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "**Exercise:** Make and draw complete directed graph with 5 nodes." + "**Exercise:** Make and draw a complete directed graph with 5 nodes." ] }, { @@ -789,7 +789,7 @@ "analysis, what is the order of growth for `is_connected`?\n", "\n", " def is_connected(G):\n", - " start = list(G)[0]\n", + " start = start = next(G.nodes_iter())\n", " reachable = reachable_nodes(G, start)\n", " return len(reachable) == len(G)" ]