Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
the code should return -1 when any of the 3 conditions are not met. The if statement is the check to see if bounce is between 0 and 1 and the while loop checks to see if the window is above 0 and the height at which the ball being dropped is higher than the window. If any of these aren't true then it will skip the if statement and therefore the while loop and return -1.