We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f43e1a commit 3e56229Copy full SHA for 3e56229
1 file changed
src/branching_logic/challenges.md
@@ -26,6 +26,21 @@ if the number is odd.
26
27
## Challenge 3
28
29
+What will this program output when run? Write down your guess and then try running it.
30
+
31
+```java,editable
32
+void main() {
33
+ int num = 10;
34
35
+ if (num > 1)
36
+ IO.println("It is greater than 1");
37
+ if (num > 5)
38
+ IO.println("It is greater than 5");
39
+}
40
+```
41
42
+## Challenge 4
43
44
Write code that will output `allowed` if the the `password` variable is equal to
45
`"abc123"` and `not allowed` if it isn't.
46
@@ -39,7 +54,7 @@ void main() {
54
}
55
```
56
-## Challenge 4
57
+## Challenge 5
58
59
Write code that will assign the string `The number {x} is even` to `message` if `x` is an even number
60
and `The number {x} is odd` if `x` is an odd number.
0 commit comments