Skip to content

Commit a77e91b

Browse files
authored
Merge pull request #207 from habibasorour/issue_202_format_2.2
Issue 202 fixed: Python formatting
2 parents 5fa4be8 + 6a9fa19 commit a77e91b

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

source/ch2_firstjavaprogram.ptx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,17 +170,24 @@
170170
<section xml:id="sec-lets-look-at-a-java-program">
171171
<title>Lets look at a Java Program</title>
172172
<p>
173-
A time-honored tradition in Computer Science is to write a program called &#x201C;hello world.&#x201D; The &#x201C;hello world&#x201D; program is simple and easy.
173+
A time-honored tradition in Computer Science is to write a program called &#x201C;Hello World.&#x201D; The &#x201C;Hello World&#x201D; program is simple and easy.
174174
There are no logic errors to make, so getting it to run relies only on understanding the syntax.
175175
To be clear, lets look at a &#x201C;complicated&#x201D; version of hello world for Python:
176176
</p>
177177

178-
<pre>def main(): print("Hello World!")</pre>
178+
<program xml:id="python-hello-world" language="python">
179+
<code>
180+
def main():
181+
print("Hello World!")
182+
</code>
183+
</program>
184+
179185
<p>
180186
Remember that we can define this program right at the Python command line and then run it:
181187
</p>
182188

183-
<pre>&gt;&gt;&gt; main() "Hello World!" &gt;&gt;&gt;</pre>
189+
<pre>&gt;&gt;&gt; main()
190+
Hello World! </pre>
184191
<p>
185192
Now let's look at the same program written in Java:
186193
</p>

0 commit comments

Comments
 (0)