Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions source/ch4_conditionals.ptx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<program xml:id="python-simple-if" interactive="activecode" language="python">
<code>
score = 95
if score &gt;= 90:
if score &gt;= 90: # Note the colon at the end of the line
print("Excellent work!")
</code>
</program>
Expand All @@ -30,9 +30,9 @@ if score &gt;= 90:
<code>
public class SimpleIfExample {
public static void main(String[] args) {
int score = 70;
if (score &lt;= 70) {
System.out.println("Needs work!");
int score = 95;
if (score &gt;= 90) { // Note the parentheses and curly braces
System.out.println("Excellent work!");
}
}
}
Expand Down