For this question, we will be working with a subclass of Jeroo called CountingJeroo that tracks the number of hops it has peformed. You...
X919: While Loops with Relational Operators 3
For this question, we will be working with a subclass of Jeroo called CountingJeroo that tracks the number of hops it has peformed.
You can access the number of hops performed so far by running the getHopCount()
method.
Below is a while loop with using a Jeroo named imani
.
The condition in the while loop below has a bug in it. Change the condition to fix the bug.
The while loop should stop once the jeroo has hopped at least once.
Note: if the wheel just keeps on spinning when you check your answer, your loop may be infinite!
Your Answer:
Feedback
Your feedback will appear here when you check your answer.