Skip to content

Commit 867c4e6

Browse files
Kristi NakajKristi Nakaj
authored andcommitted
fixed issue#247
1 parent 7d75694 commit 867c4e6

7 files changed

Lines changed: 10 additions & 10 deletions

File tree

pretext/Functions/Functionsthatreturnvalues.ptx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ print(max(3 * 11, 5 ** 3, 512 - 9, 1024 ** 0))
4343
125, and 1. Note that <c>max</c> also works on lists of values.</p>
4444
<p>Furthermore, functions like <c>range</c>, <c>int</c>, <c>abs</c> all return values that
4545
can be used to build more complex expressions.</p>
46-
<p xml:id="functions_index-1">So an important difference between these functions and one like <c>drawSquare</c> is that
46+
<p xml:id="functions_index_1">So an important difference between these functions and one like <c>drawSquare</c> is that
4747
<c>drawSquare</c> was not executed because we wanted it to compute a value &#x2014; on the contrary,
4848
we wrote <c>drawSquare</c> because we wanted it to execute a sequence of steps that caused
4949
the turtle to draw a specific shape.</p>

pretext/Functions/Variablesandparametersarelocal.ptx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ result = badsquare(10)
4040
print(result)
4141
</input>
4242
</program>
43-
<p xml:id="functions_index-1">Although the <c>badsquare</c> function works, it is silly and poorly written. We have done it here to illustrate
43+
<p xml:id="functions-index-1">Although the <c>badsquare</c> function works, it is silly and poorly written. We have done it here to illustrate
4444
an important rule about how variables are looked up in Python.
4545
First, Python looks at the variables that are defined as local variables in
4646
the function. We call this the <term>local scope</term>. If the variable name is not

pretext/GUIandEventDrivenProgramming/05_widget_grouping.ptx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
and location using a layout manager. The image below shows examples of the
5757
four types of widget <q>containers</q>. The <q>containers</q> in this example used a
5858
<c>grid</c> layout manager on a 2x2 grid.</p>
59-
<figure align="center" xml:id="id1">
59+
<figure align="center" xml:id="id_1">
6060
<caption xmlns:c="https://www.sphinx-doc.org/" xmlns:changeset="https://www.sphinx-doc.org/" xmlns:citation="https://www.sphinx-doc.org/" xmlns:cpp="https://www.sphinx-doc.org/" xmlns:index="https://www.sphinx-doc.org/" xmlns:js="https://www.sphinx-doc.org/" xmlns:math="https://www.sphinx-doc.org/" xmlns:py="https://www.sphinx-doc.org/" xmlns:rst="https://www.sphinx-doc.org/" xmlns:std="https://www.sphinx-doc.org/">Examples of grouping widgets</caption>
6161
<image source="GUIandEventDrivenProgramming/Figures/Grouping_examples.png" width="50%"/>
6262
</figure>

pretext/GUIandEventDrivenProgramming/11_gui_program_example.ptx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<p>Step 1: Make sure you have a reasonable GUI design and implementation plan
4444
before you start coding. Draw a sketch of your initial design on paper
4545
and consider how a user will interact with your program.</p>
46-
<figure align="center" xml:id="id1">
46+
<figure align="center" xml:id="id-1">
4747
<caption xmlns:c="https://www.sphinx-doc.org/" xmlns:changeset="https://www.sphinx-doc.org/" xmlns:citation="https://www.sphinx-doc.org/" xmlns:cpp="https://www.sphinx-doc.org/" xmlns:index="https://www.sphinx-doc.org/" xmlns:js="https://www.sphinx-doc.org/" xmlns:math="https://www.sphinx-doc.org/" xmlns:py="https://www.sphinx-doc.org/" xmlns:rst="https://www.sphinx-doc.org/" xmlns:std="https://www.sphinx-doc.org/">Initial design of a Whack-a-mole game</caption>
4848
<image source="GUIandEventDrivenProgramming/Figures/Whack_a_mole_design.png" width="50%"/>
4949
</figure>

pretext/IntroRecursion/CalculatingtheSumofaListofNumbers.ptx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ print(listsum([1,3,5,7,9]))
2626
problem from adding a list to adding pairs of numbers, we could rewrite
2727
the list as a fully parenthesized expression. Such an expression looks
2828
like this:</p>
29-
<math_block docname="IntroRecursion/CalculatingtheSumofaListofNumbers" label="True" nowrap="False" number="True" xml:space="preserve">((((1 + 3) + 5) + 7) + 9)
29+
<math_block docname="IntroRecursion/CalculatingtheSumofaListofNumbers" label1="True" nowrap="False" number="True" xml:space="preserve">((((1 + 3) + 5) + 7) + 9)
3030

3131
</math_block>
3232
<p>We can also parenthesize
3333
the expression the other way around,</p>
34-
<math_block docname="IntroRecursion/CalculatingtheSumofaListofNumbers" label="True" nowrap="False" number="True" xml:space="preserve">(1 + (3 + (5 + (7 + 9))))</math_block>
34+
<math_block docname="IntroRecursion/CalculatingtheSumofaListofNumbers" label2="True" nowrap="False" number="True" xml:space="preserve">(1 + (3 + (5 + (7 + 9))))</math_block>
3535
<p>Notice that the innermost set of
3636
parentheses, <math>(7 + 9)</math>, is a problem that we can solve without a
3737
loop or any special constructs. In fact, we can use the following
3838
sequence of simplifications to compute a final sum.</p>
39-
<math_block docname="IntroRecursion/CalculatingtheSumofaListofNumbers" label="True" nowrap="False" number="True" xml:space="preserve">total = \ (1 + (3 + (5 + (7 + 9)))) \\
39+
<math_block docname="IntroRecursion/CalculatingtheSumofaListofNumbers" label3="True" nowrap="False" number="True" xml:space="preserve">total = \ (1 + (3 + (5 + (7 + 9)))) \\
4040
total = \ (1 + (3 + (5 + 16))) \\
4141
total = \ (1 + (3 + 21)) \\
4242
total = \ (1 + 24) \\
@@ -46,7 +46,7 @@ total = \ 25</math_block>
4646
the sum of the list <c>numList</c> is the sum of the first element of the
4747
list (<c>numList[0]</c>), and the sum of the numbers in the rest of the
4848
list (<c>numList[1:]</c>). To state it in a functional form:</p>
49-
<math_block docname="IntroRecursion/CalculatingtheSumofaListofNumbers" label="True" nowrap="False" number="True" xml:space="preserve"> listSum(numList) = first(numList) + listSum(rest(numList))
49+
<math_block docname="IntroRecursion/CalculatingtheSumofaListofNumbers" label4="True" nowrap="False" number="True" xml:space="preserve"> listSum(numList) = first(numList) + listSum(rest(numList))
5050
\label{eqn:listsum}</math_block>
5151
<p>In this equation <math>first(numList)</math> returns the first element of
5252
the list and <math>rest(numList)</math> returns a list of everything but

pretext/Lists/ListValues.ptx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ newlist = [ numbers, vocabulary ]
3535
print(newlist)
3636
</input>
3737
</program>
38-
<p xml:id="lists_accessing-elements" names="accessing-elements">
38+
<p xml:id="lists_accessing_elements" names="accessing-elements">
3939
<term>Check your understanding</term>
4040
</p>
4141
<exercise label="test_question9_1_1">

pretext/MoreAboutIteration/RandomlyWalkingTurtles.ptx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ wn.exitonclick()
172172
that if you ever need to write a similar program, you can reuse this function
173173
with confidence the next time you need it. Breaking up this
174174
program into a couple of parts is another example of functional decomposition.</p>
175-
<p xml:id="more-about-iteration_index-0">
175+
<p xml:id="more-about-iteration-index-0">
176176
<term>Check your understanding</term>
177177
</p>
178178
<exercise label="test_question7_3_1">

0 commit comments

Comments
 (0)