There was an error while loading. Please reload this page.
2 parents a1c3cc2 + 8f4791e commit d70ea78Copy full SHA for d70ea78
1 file changed
source/ch4_conditionals.ptx
@@ -20,7 +20,7 @@
20
<program interactive="activecode" language="python">
21
<code>
22
score = 95
23
-if score >= 90:
+if score >= 90: # Note the colon at the end of the line
24
print("Excellent work!")
25
</code>
26
</program>
@@ -36,9 +36,9 @@ if score >= 90:
36
37
public class SimpleIfExample {
38
public static void main(String[] args) {
39
- int score = 70;
40
- if (score <= 70) {
41
- System.out.println("Needs work!");
+ int score = 95;
+ if (score >= 90) { // Note the parentheses and curly braces
+ System.out.println("Excellent work!");
42
}
43
44
0 commit comments