X898: Jeroo add else-if-else-if

You are writing code using a jeroo named amy. Change the following if-else-if statement by adding a new else-if so that amy will turn right if she sees a flower to the right. However, choose the location of this carefully, so that if flowers are both ahead and to the right, amy will hop instead of turn. Remember that the branches of the if-else-if are tested in the order listed, and the first condition that is true will be acted on.

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.