Loops and conditions can be used in the Main method and in Jeroo methods.
WHILE Example: Kim picks all flowers in a line of flowers ahead, then turns left | |
as part of the main method | as part of an original method named pickRow |
method main() |
method pickRow( ) } |
Compound Conditions: && (and), || (or), !(not) Using the examples, write the code for these conditions:
Nested control structures:
Circle the correct way to say:
“there is not a net on the left or right”
1.! isNet(LEFT) || !isNet(RIGHT)
2.!isNet(LEFT) && !isNet(RIGHT)
|
How do you know that a Jeroo has reached the end of the island?
|
How do you say “ keep hopping until you reach the end of the island”? |
Copy the Final Version of the solution to:
|