Skip to content

Commit a96e7d7

Browse files
committed
Added xml ids to each code block.
1 parent 3c54639 commit a96e7d7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎source/ch2_firstjavaprogram.ptx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
The best way to understand classes and objects is to see them in action. Let's define a <c>Dog</c> class in Python:
3131
</p>
3232

33-
<program language="python">
33+
<program language="python" xml:id="python-class-example">
3434
<input>
3535
class Dog:
3636
def __init__(self, name, breed, fur_color):
@@ -71,7 +71,7 @@
7171
Next, we will use this class to create a new <c>Dog</c> object. We will call this new Dog object <c>my_dog</c>:
7272
</p>
7373

74-
<program interactive="activecode" language="python">
74+
<program interactive="activecode" language="python" xml:id="python-class-create-object">
7575
<input>
7676
class Dog:
7777
def __init__(self, name, breed, fur_color):
@@ -106,7 +106,7 @@
106106
Now that we have created a <c>Dog</c> object using the class we defined, we can utilize the class's methods:
107107
</p>
108108

109-
<program interactive="activecode" language="python">
109+
<program interactive="activecode" language="python" xml:id="python-class-full">
110110
<input>
111111
class Dog:
112112
def __init__(self, name, breed, fur_color):

0 commit comments

Comments
 (0)