Skip to content

Commit 7b653dc

Browse files
committed
added active code
1 parent 94f305a commit 7b653dc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

source/ch4_conditionals.ptx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,15 +178,15 @@ public class ElseIf {
178178
<title>Using the <c>switch</c> Statement</title>
179179

180180
<p>
181-
Java also supports a <c>switch</c> statement that acts something like the <c>elif</c> or Python <c>match</c> statement under certain conditions.<xref ref="python-match" text="type-global"/> shows how the the grade program using a <c>switch</c> statement could be in Python.
181+
Java also supports a <c>switch</c> statement that acts something like the <c>elif</c> or Python <c>match</c> statement under certain conditions.<xref ref="python-match" text="type-global"/> shows how a grade program using a <c>switch</c> statement would look in Python.
182182
</p>
183183

184184
<note>
185185
<p>
186186
The <c>match - case</c> statement was introduced in Python 3.10, so doesn't run in earlier version of Python. Here is an example using Python's <c>match - case</c> structure.
187187
</p></note>
188188
<listing xml:id ="python-match">
189-
<program language="python">
189+
<program interactive="activecode" language="python">
190190
<title>Match Case Example</title>
191191
<code>
192192
grade = 85

0 commit comments

Comments
 (0)