Skip to content

Commit b176a5c

Browse files
committed
fixes to rst
1 parent c41efea commit b176a5c

9 files changed

Lines changed: 22 additions & 28 deletions

File tree

_sources/FrontBackMatter/copyright.rst

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@
99
Copyright Notice
1010
================
1111

12-
| Copyright (C) Brad Miller, David Ranum, Jeffrey Elkner, Peter Wentworth, Allen B. Downey, Chris
13-
| Meyers, and Dario Mitchell. Permission is granted to copy, distribute
14-
| and/or modify this document under the terms of the GNU Free Documentation
15-
| License, Version 1.3 or any later version published by the Free Software
16-
| Foundation; with Invariant Sections being Forward, Prefaces, and
17-
| Contributor List, no Front-Cover Texts, and no Back-Cover Texts. A copy of
18-
| the license is included in the section entitled "GNU Free Documentation
19-
| License".
12+
Copyright (C) Brad Miller, David Ranum, Jeffrey Elkner, Peter Wentworth, Allen B. Downey, Chris
13+
Meyers, and Dario Mitchell. Permission is granted to copy, distribute
14+
and/or modify this document under the terms of the GNU Free Documentation
15+
License, Version 1.3 or any later version published by the Free Software
16+
Foundation; with Invariant Sections being Forward, Prefaces, and
17+
Contributor List, no Front-Cover Texts, and no Back-Cover Texts. A copy of
18+
the license is included in the section entitled "GNU Free Documentation License".

_sources/Functions/Functionsthatreturnvalues.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,6 @@ debugging
118118
easier. These temporary variables are examples of **local variables**, pursued further
119119
in the next section.
120120

121-
.. The line `toInvest = float(input("How much do you want to invest?"))`
122-
.. also shows yet another example
123-
.. of *composition* --- we can call a function like `float`, and its arguments
124-
.. can be the results of other function calls (like `input`) that we've called along the way.
125-
126121
Notice something important here. The name of the variable we pass as an
127122
argument --- ``toSquare`` --- has nothing to do with the name of the formal parameter
128123
--- ``x``. It is as if ``x = toSquare`` is executed when ``square`` is called.

_sources/GUIandEventDrivenProgramming/12_model_view_controller.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ four basic commands we need to send to the *model*:
9595

9696
* A user clicked on something on the left frame.
9797
* The user wants to start a new game. (The user clicked on the "Start" button.)
98-
* The user wants to stop playing a game. (The user clicked on the "Stop button.)
98+
* The user wants to stop playing a game. (The user clicked on the "Stop" button.)
9999
* The user wants to quit the application. (The user clicked on the "Quit" button.)
100100

101101
The *controller** needs to recognize these events and send them to appropriate

_sources/PythonTurtle/OurFirstTurtleProgram.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,10 @@ screen until we click on it.
218218
:answer_c: It makes the turtle draw half of a rectangle on the screen.
219219
:answer_d: Nothing, it is unnecessary.
220220
:correct: b
221-
:feedback_a: The line &quotalex = turtle.Turtle()&quot is what actually creates the turtle object.
221+
:feedback_a: The line "alex = turtle.Turtle()" is what actually creates the turtle object.
222222
:feedback_b: This line imports the module called turtle, which has all the built in functions for drawing on the screen with the Turtle object.
223-
:feedback_c: This functionality is performed with the lines: &quotalex.forward(150)&quot, &quotlex.left(90)&quot, and &quotalex.forward(75)&quot
224-
:feedback_d: If we leave it out, Python will give an error saying that it does not know about the name &quotturtle&quot when it reaches the line &quotwn = turtle.Screen()&quot
223+
:feedback_c: This functionality is performed with the lines: "alex.forward(150)", "lex.left(90)", and "alex.forward(75)"
224+
:feedback_d: If we leave it out, Python will give an error saying that it does not know about the name "turtle" when it reaches the line "wn = turtle.Screen()"
225225

226226
Consider the following code:
227227

@@ -260,11 +260,11 @@ screen until we click on it.
260260

261261
.. mchoice:: test_question3_1_4
262262
:practice: T
263-
:answer_a: <img src="../_static/test1Alt1.png" alt="right turn of 90 degrees before drawing, draw a line 150 pixels long, turn left 90, and draw a line 75 pixels long">
264-
:answer_b: <img src="../_static/test1Alt2.png" alt="left turn of 180 degrees before drawing, draw a line 150 pixels long, turn left 90, and draw a line 75 pixels long">
265-
:answer_c: <img src="../_static/test1Alt3.png" alt="left turn of 270 degrees before drawing, draw a line 150 pixels long, turn left 90, and draw a line 75 pixels long">
266-
:answer_d: <img src="../_static/test1Alt4v2.png" alt="right turn of 270 degrees before drawing, draw a line 150 pixels long, turn right 90, and draw a line 75 pixels long">
267-
:answer_e: <img src="../_static/test1correct.png" alt="left turn of 90 degrees before drawing, draw a line 150 pixels long, turn left 90, and draw a line 75 pixels long">
263+
:answer_a: <img src="../_static/test1Alt1.png" alt="right turn of 90 degrees before drawing, draw a line 150 pixels long, turn left 90, and draw a line 75 pixels long"/>
264+
:answer_b: <img src="../_static/test1Alt2.png" alt="left turn of 180 degrees before drawing, draw a line 150 pixels long, turn left 90, and draw a line 75 pixels long"/>
265+
:answer_c: <img src="../_static/test1Alt3.png" alt="left turn of 270 degrees before drawing, draw a line 150 pixels long, turn left 90, and draw a line 75 pixels long">/
266+
:answer_d: <img src="../_static/test1Alt4v2.png" alt="right turn of 270 degrees before drawing, draw a line 150 pixels long, turn right 90, and draw a line 75 pixels long"/>
267+
:answer_e: <img src="../_static/test1correct.png" alt="left turn of 90 degrees before drawing, draw a line 150 pixels long, turn left 90, and draw a line 75 pixels long"/>
268268
:correct: e
269269
:feedback_a: This code would turn the turtle to the south before drawing
270270
:feedback_b: This code would turn the turtle to the west before drawing

_sources/Selection/BooleanFunctions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ the boolean expression causes a call to the ``isDivisible`` function. This is v
107107
:answer_b: No
108108
:correct: a
109109
:feedback_a: It is perfectly valid to return the result of evaluating a Boolean expression.
110-
:feedback_b: x +y < z is a valid Boolean expression, which will evaluate to True or False. It is perfectly legal to return True or False from a function, and to have the statement to be evaluated in the same line as the return keyword.
110+
:feedback_b: x +y &lt; z is a valid Boolean expression, which will evaluate to True or False. It is perfectly legal to return True or False from a function, and to have the statement to be evaluated in the same line as the return keyword.
111111

112112
Is the following statement legal in a Python function (assuming x, y and z are defined to be numbers)?
113113

_sources/SimplePythonData/OrderofOperations.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ rules for its mathematical operators that mathematics does.
5151

5252
.. (The
5353
.. acronym PEDMAS could mislead you to thinking that division has higher
54-
.. precedence than multiplication, and addition is done ahead of subtraction -
55-
.. don't be misled. Subtraction and addition are at the same precedence, and
54+
.. precedence than multiplication, and addition is done ahead of subtraction.
55+
.. Don't be misled. Subtraction and addition are at the same precedence, and
5656
.. the left-to-right rule applies.)
5757
5858
.. note::

_sources/UnitTesting/CheckingAssumptionsWithAssert.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ to help streamline the diagnostic work.
239239
An ``assert`` statement displays output if the condition is True.
240240

241241
.. mchoice:: mc_assert_2
242-
:answer_a: assert len(msg) <= 0
242+
:answer_a: assert len(msg) &lt;= 0
243243
:answer_b: assert len(msg) > 0
244244
:answer_c: assert msg[0]
245245
:answer_d: none of these

_sources/UnitTesting/DesigningTestableFunctions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ precondition and postcondition terminology in your docstrings, it helps to *thin
161161
**Check your understanding**
162162

163163
.. mchoice:: mc_testable_2
164-
:answer_a: len(msg) <= 0
164+
:answer_a: len(msg) &lt;= 0
165165
:answer_b: len(msg) > 0
166166
:answer_c: msg == ""
167167
:answer_d: none of these

_sources/UnitTesting/TestingWithpytest.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ sense, just remember: in order for pytest to work correctly, any code that is pa
247247
def grade(score):
248248
global illegal, testA, testB, testF
249249

250-
if score > 100 or score < 0:
250+
if score > 100 or score &lt; 0:
251251
illegal = True
252252
return ''
253253
elif score >= 90:

0 commit comments

Comments
 (0)