Skip to content

Commit 75ce01a

Browse files
authored
Merge pull request #265 from habibasorour/issue_251_comment
Issue 251 fixed: added comments to 4.2 blocks
2 parents 3924533 + 40f1886 commit 75ce01a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

source/ch4_conditionals.ptx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ if score >= 90: # Note the colon at the end of the line
6060
<program interactive="activecode" language="python">
6161
<code>
6262
age = 16
63-
if age &gt;= 18:
63+
if age &gt;= 18:
6464
print("You can vote.")
65-
else:
65+
else: # notice the semicolon
6666
print("You are not yet eligible to vote.")
6767
</code>
6868
</program>
@@ -77,7 +77,7 @@ if score &gt;= 90: # Note the colon at the end of the line
7777
int age = 16;
7878
if (age &gt;= 18) {
7979
System.out.println("You can vote.");
80-
} else {
80+
} else { // else has its own block.
8181
System.out.println("You are not yet eligible to vote.");
8282
}
8383
}

0 commit comments

Comments
 (0)