Skip to content

Commit 5f94fdd

Browse files
committed
fixed the format of python in 2.2
1 parent ffcb205 commit 5f94fdd

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

source/ch2_firstjavaprogram.ptx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,19 @@
156156
To be clear, lets look at a “complicated” version of hello world for Python:
157157
</p>
158158

159-
<pre>def main(): print("Hello World!")</pre>
159+
<program xml:id="python-hello-world" language="python">
160+
<code>
161+
def main():
162+
print("Hello World!")
163+
</code>
164+
</program>
165+
160166
<p>
161167
Remember that we can define this program right at the Python command line and then run it:
162168
</p>
163169

164-
<pre>&gt;&gt;&gt; main() "Hello World!" &gt;&gt;&gt;</pre>
170+
<pre>&gt;&gt;&gt; main()
171+
Hello World! </pre>
165172
<p>
166173
Now let's look at the same program written in Java:
167174
</p>

0 commit comments

Comments
 (0)