Skip to content

Commit 28bb0c2

Browse files
committed
added listing to blocks
1 parent a572688 commit 28bb0c2

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

source/ch4_conditionals.ptx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ if score >= 90:
4848
<title>Using the <c>if</c> - <c>else</c> Statement</title>
4949

5050
<p>The Java equivalent follows the same syntactical rules as before.</p>
51-
<program xml:id="python-if-else" interactive="activecode" language="python">
51+
<listing xml:id="python-if-else">
52+
<program interactive="activecode" language="python">
5253
<code>
5354
age = 16
5455
if age &gt;= 18:
@@ -57,8 +58,10 @@ if score &gt;= 90:
5758
print("You are not yet eligible to vote.")
5859
</code>
5960
</program>
61+
</listing>
6062

61-
<program xml:id="java-if-else" interactive="activecode" language="java">
63+
<listing xml:id="java-if-else">
64+
<program interactive="activecode" language="java">
6265
<code>
6366
public class IfElseExample {
6467
public static void main(String[] args) {
@@ -72,6 +75,7 @@ if score &gt;= 90:
7275
}
7376
</code>
7477
</program>
78+
</listing>
7579
</section>
7680

7781
<section xml:id="elif">

0 commit comments

Comments
 (0)