Skip to content

Commit 2fee284

Browse files
committed
Remove title_reference tags
1 parent b192c3c commit 2fee284

36 files changed

Lines changed: 472 additions & 399 deletions

pretext/ClassesBasics/UserDefinedClasses.ptx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ print("Nothing seems to have happened with the points")
6666
</input>
6767
</program>
6868
<p>During the initialization of the objects, we created two
69-
attributes called <title_reference>x</title_reference> and <title_reference>y</title_reference> for each, and gave them both the value 0.</p>
69+
attributes called x and y for each, and gave them both the value 0.</p>
7070
<note>
7171
<p>The asignments are not to <c>x</c> and <c>y</c>, but to <c>self.x</c> and <c>self.y</c>.
7272
The attributes <c>x</c> and <c>y</c> are <em>always</em> attached to a particular instance.

pretext/ClassesDiggingDeeper/Fractions.ptx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
on the top is called the numerator and the number on the bottom is called the denominator. Sometimes people use a slash
1010
for the line and sometimes they use a straight line. The fact is that it really does not matter so long as you know which
1111
is the numerator and which is the denominator.</p>
12-
<p>To design our class, we simply need to use the analysis above to realize that the <title_reference>state</title_reference> of a fraction object can be
12+
<p>To design our class, we simply need to use the analysis above to realize that the state of a fraction object can be
1313
completely described by representing two integers. We can begin by implementing the <c>Fraction</c> class and the <c>__init__</c>
1414
method which will allow the user to provide a numerator and a denominator for the fraction being created.</p>
1515
<program xml:id="fractions_init" interactive="activecode" language="python">

pretext/Dictionaries/Exercises.ptx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ add_fruit(new_inventory, 'strawberries', 25)
138138
<statement>
139139
<p>Write a program called <c>alice_words.py</c> that creates a text file named
140140
<c>alice_words.txt</c> containing an alphabetical listing of all the words, and the
141-
number of times each occurs, in the text version of <title_reference>Alice's Adventures in Wonderland</title_reference>.
141+
number of times each occurs, in the text version of Alice's Adventures in Wonderland.
142142
(You can obtain a free plain text version of the book, along with many others, from
143143
<url href="http://www.gutenberg.org" visual="http://www.gutenberg.org">http://www.gutenberg.org</url>.) The first 10 lines of your output file should look
144144
something like this</p>
@@ -263,7 +263,7 @@ for word in keys:
263263
out.write('\n')
264264

265265
print("The word 'alice' appears " + str(count['alice']) + " times in the book.")
266-
266+
267267
<program language="python"><input>
268268
f = open('alice.txt', 'r')
269269

pretext/Files/AlternativeFileReadingMethods.ptx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,6 @@ infile.close()
145145
blank line in the file actually has a single character, the <c>\n</c> character (newline).
146146
So, the only way that a line of data from the
147147
file can be empty is if you are reading at the end of the file, and the <c>while</c> condition becomes <c>False</c>.</p>
148-
<p>Finally, notice that the last line of the body of the <c>while</c> loop performs another <c>readline</c>. This statement will reassign the variable <c>line</c> to the next line of the file. It represents the <title_reference>change of state</title_reference> that is necessary for the iteration to
148+
<p>Finally, notice that the last line of the body of the <c>while</c> loop performs another <c>readline</c>. This statement will reassign the variable <c>line</c> to the next line of the file. It represents the change of state that is necessary for the iteration to
149149
function correctly. Without it, there would be an infinite loop processing the same line of data over and over.</p>
150150
</section>

pretext/Files/WithStatements.ptx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ with open('mydata.txt') as md:
2222
print(md)
2323
</input>
2424
</program>
25-
<p>The first line of the <title_reference>with</title_reference> statement opens the file and assigns it to <title_reference>md</title_reference> then we can iterate over the file in any of the usual ways. and when we are done we simply stop indenting and let Python take care of closing the file and cleaning up.</p>
25+
<p>The first line of the with statement opens the file and assigns it to md then we can iterate over the file in any of the usual ways. and when we are done we simply stop indenting and let Python take care of closing the file and cleaning up.</p>
2626
</section>

pretext/FrontBackMatter/contrib.ptx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
<p>Benoit Girard sent in a correction to a humorous mistake in Section 5.6.</p>
117117
</li>
118118
<li>
119-
<p>Courtney Gleason and Katherine Smith wrote <title_reference>horsebet.py</title_reference>, which was used as a
119+
<p>Courtney Gleason and Katherine Smith wrote horsebet.py, which was used as a
120120
case study in an earlier version of the book. Their program can now be found
121121
on the website.</p>
122122
</li>
@@ -129,7 +129,7 @@
129129
corrections.</p>
130130
</li>
131131
<li>
132-
<p>David Kershaw fixed the broken <title_reference>catTwice</title_reference> function in Section 3.10.</p>
132+
<p>David Kershaw fixed the broken catTwice function in Section 3.10.</p>
133133
</li>
134134
<li>
135135
<p>Eddie Lam has sent in numerous corrections to Chapters 1, 2, and 3. He also
@@ -152,7 +152,7 @@
152152
</li>
153153
<li>
154154
<p>Simon Dicon Montford reported a missing function definition and several typos
155-
in Chapter 3. He also found errors in the <title_reference>increment</title_reference> function in Chapter 13.</p>
155+
in Chapter 3. He also found errors in the increment function in Chapter 13.</p>
156156
</li>
157157
<li>
158158
<p>John Ouzts corrected the definition of return value in Chapter 3.</p>

pretext/FrontBackMatter/preface2e.ptx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@
117117
students seeing this example are looking at their first program. Some of them
118118
are undoubtedly a little nervous, having heard that computer programming is
119119
difficult to learn. The Java version has always forced me to choose between two
120-
unsatisfying options: either to explain the <title_reference>class Hello</title_reference>,
121-
<title_reference>public static void main</title_reference>, <title_reference>String[] args</title_reference>, <title_reference>{</title_reference>, and <title_reference>}</title_reference>, statements and risk
120+
unsatisfying options: either to explain the class Hello,
121+
public static void main, String[] args, {, and }, statements and risk
122122
confusing or intimidating some of the students right at the start, or to tell
123123
them, Just don't worry about all of that stuff now; we will talk about it
124124
later, and risk the same thing. The educational objectives at this point in the

pretext/Functions/ATurtleBarChart.ptx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<ul>
88
<li>
99
<p>We can get a turtle to display text on the canvas at the turtle's current position. The method is called <c>write</c>.
10-
For example, <c>alex.write("Hello")</c> would write the string <title_reference>hello</title_reference> at the current position.</p>
10+
For example, <c>alex.write("Hello")</c> would write the string hello at the current position.</p>
1111
</li>
1212
<li>
1313
<p>One can fill a shape (circle, semicircle, triangle, etc.) with a fill color. It is a two-step process.

pretext/Functions/Exercises.ptx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ drawSpiral(guido, 89)
185185
<exercise label="ex_5_7">
186186
<statement>
187187
<p>Write a fruitful function <c>sumTo(n)</c> that returns the sum of all integer numbers up to and
188-
including <title_reference>n</title_reference>. So <c>sumTo(10)</c> would be <c>1+2+3...+10</c> which would return the value 55. Use the
188+
including n. So <c>sumTo(10)</c> would be <c>1+2+3...+10</c> which would return the value 55. Use the
189189
equation (n * (n + 1)) / 2.</p>
190190
</statement>
191191
<program interactive="activecode" language="python" xml:id="ex_5_7_editor">
@@ -228,7 +228,7 @@ print("The sum from 1 to 5 is",t)
228228
</exercise>
229229
<exercise label="ex_5_8">
230230
<statement>
231-
<p>Write a function <title_reference>areaOfCircle(r)</title_reference> which returns the area of a circle of radius <title_reference>r</title_reference>. Make sure you use the math module in your solution.</p>
231+
<p>Write a function areaOfCircle(r) which returns the area of a circle of radius r. Make sure you use the math module in your solution.</p>
232232
</statement>
233233
<program xml:id="ex_5_8_editor" interactive="activecode" language="python">
234234
<input>
@@ -331,7 +331,7 @@ drawStar(stroustrup, 7)
331331
<exercise label="ex_5_13">
332332
<statement>
333333
<p>Rewrite the function <c>sumTo(n)</c> that returns the sum of all integer numbers up to and
334-
including <title_reference>n</title_reference>. This time use the accumulator pattern.</p>
334+
including n. This time use the accumulator pattern.</p>
335335
</statement>
336336
<program interactive="activecode" language="python" xml:id="ex_5_13_editor">
337337
<input>
@@ -435,7 +435,7 @@ print(pi_approx)
435435
</exercise>
436436
<exercise label="ex_5_16">
437437
<statement>
438-
<p>Write a function called <title_reference>myPi</title_reference> that will return an approximation of PI (3.14159&#x2026;). Use the <url href="http://en.wikipedia.org/wiki/Madhava_of_Sangamagrama" visual="http://en.wikipedia.org/wiki/Madhava_of_Sangamagrama">Madhava</url>
438+
<p>Write a function called myPi that will return an approximation of PI (3.14159&#x2026;). Use the <url href="http://en.wikipedia.org/wiki/Madhava_of_Sangamagrama" visual="http://en.wikipedia.org/wiki/Madhava_of_Sangamagrama">Madhava</url>
439439
approximation.</p>
440440
</statement>
441441
<program xml:id="ex_5_16_editor" interactive="activecode" language="python">
@@ -451,8 +451,8 @@ def myPi(iters):
451451
</exercise>
452452
<exercise label="ex_5_17">
453453
<statement>
454-
<p>Write a function called <title_reference>fancySquare</title_reference> that will draw a square with fancy corners (sprites on the corners). You should
455-
implement and use the <title_reference>drawSprite</title_reference> function from above. For an even more interesting look, how about adding small
454+
<p>Write a function called fancySquare that will draw a square with fancy corners (sprites on the corners). You should
455+
implement and use the drawSprite function from above. For an even more interesting look, how about adding small
456456
triangles to the ends of the sprite legs.</p>
457457
</statement>
458458
<program interactive="activecode" language="python" xml:id="ex_5_17_editor">

pretext/Functions/Functionscancallotherfunctions.ptx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
def square(x):
1717
y = x * x
1818
return y
19-
19+
2020
def sum_of_squares(x, y, z):
2121
a = square(x)
2222
b = square(y)
2323
c = square(z)
24-
24+
2525
return a + b + c
26-
26+
2727
a = -5
2828
b = 2
2929
c = 10
@@ -116,11 +116,11 @@ wn.exitonclick()
116116
<p>Functions can call other functions.</p>
117117
</li>
118118
<li>
119-
<p>Rewriting <title_reference>drawSquare</title_reference> like this captures the relationship
119+
<p>Rewriting drawSquare like this captures the relationship
120120
that we've spotted.</p>
121121
</li>
122122
<li>
123-
<p>A caller of this function might say <title_reference>drawSquare(tess, 50)</title_reference>. The parameters
123+
<p>A caller of this function might say drawSquare(tess, 50). The parameters
124124
of this function, <c>tx</c> and <c>sz</c>, are assigned the values of the tess object, and
125125
the integer 50 respectively.</p>
126126
</li>
@@ -130,7 +130,7 @@ wn.exitonclick()
130130
<li>
131131
<p>When the call is made to <c>drawRectangle</c>, the values in variables <c>tx</c> and <c>sz</c>
132132
are fetched first, then the call happens. So as we enter the top of
133-
function <title_reference>drawRectangle</title_reference>, its variable <c>t</c> is assigned the tess object, and <c>w</c> and
133+
function drawRectangle, its variable <c>t</c> is assigned the tess object, and <c>w</c> and
134134
<c>h</c> in that function are both given the value 50.</p>
135135
</li>
136136
</ul>

0 commit comments

Comments
 (0)