Skip to content

Commit a723a40

Browse files
author
Ricardo Duarte
committed
Few adjustments in Chapter 4
1 parent 6223503 commit a723a40

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

Chapter4/Chapter4_Loops.ipynb

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
},
55
"nbformat": 3,
66
"nbformat_minor": 0,
7-
"orig_nbformat": 2,
87
"worksheets": [
98
{
109
"cells": [
1110
{
1211
"cell_type": "markdown",
12+
"metadata": {},
1313
"source": [
1414
"[Python for Developers](http://ricardoduarte.github.io/python-for-developers/#content)\n",
1515
"===================================\n",
@@ -25,7 +25,7 @@
2525
"---\n",
2626
"It is the repetition structure most often used in the Python. The statement accepts not only static\u00a0sequences, but also sequences generated by iterators. Iterators are structures that allow iterations, ie access to items of a collection of elements, sequentially.\n",
2727
"\n",
28-
"![Loop Example](files/bpypd_diags3.png)\n",
28+
"![Loop Example](files/bpyfd_diags3.png)\n",
2929
"\n",
3030
"During the execution of a *for* loop , the reference points to an element in the sequence. At each iteration, the reference is updated, in order to the *for* code block to process the corresponding element.\n",
3131
"\n",
@@ -54,6 +54,7 @@
5454
"print s"
5555
],
5656
"language": "python",
57+
"metadata": {},
5758
"outputs": [
5859
{
5960
"output_type": "stream",
@@ -67,8 +68,9 @@
6768
},
6869
{
6970
"cell_type": "markdown",
71+
"metadata": {},
7072
"source": [
71-
"The function `range (m, n, p)`, is very useful in loops, as it returns a list of integers starting at `m` through smaller than\u00a0`n` in steps of length `p`, which can be used as the order for the loop.\n",
73+
"The function `range(m, n, p)`, is very useful in loops, as it returns a list of integers starting at `m` through smaller than\u00a0`n` in steps of length `p`, which can be used as the order for the loop.\n",
7274
"\n",
7375
"While\n",
7476
"-----\n",
@@ -102,6 +104,7 @@
102104
"print s"
103105
],
104106
"language": "python",
107+
"metadata": {},
105108
"outputs": [
106109
{
107110
"output_type": "stream",
@@ -115,6 +118,7 @@
115118
},
116119
{
117120
"cell_type": "markdown",
121+
"metadata": {},
118122
"source": [
119123
"The *while* loop is appropriate when there is no way to determine how many iterations will occur and there is a sequence to follow."
120124
]
@@ -124,6 +128,7 @@
124128
"collapsed": false,
125129
"input": [],
126130
"language": "python",
131+
"metadata": {},
127132
"outputs": [
128133
{
129134
"html": [
@@ -200,7 +205,8 @@
200205
],
201206
"prompt_number": 1
202207
}
203-
]
208+
],
209+
"metadata": {}
204210
}
205211
]
206212
}

Chapter4/bpyfd_diags3.png

57.6 KB
Loading

Chapter4/bpypd_diags3.png

-62 KB
Binary file not shown.

0 commit comments

Comments
 (0)