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.
imagine if it asks for nano seconds or an unit even smaller, the top solution is better cause it won't be much of a problem to edit compared to this one
This solution would be better if it used a named constant instead of the abstract value.
This comment is hidden because it contains spoiler information about the solution
i made that mistake, thought that the bounce is the amount that is to be subtacted but it is the remainingheight after bounce.
There are people who can't do math, so...
What are you subtracting by? Setting the h to h*bounce gives you the new height and drop of the ball each iteration.
bloody hell I knew this had to be some type of formula he had to have known, thank you
because 'bounce' is literally how much % of the way the ball is reaching up since it's last descent from 'h' (h * bounce = new height of the ball), not how much it's descending per bounce.
At what point is it a programming challenge versus a math challenge? With a type of result like this it just seems like a problem your algebra teacher gave you, and not a great programming exercise.
Subtract bounce from height?
Why not subtract instead of multiply? Intuitively, it feels like subtraction makes sense to me.
Why not subtract instead of multiply? Intuitively, it feels like subtraction makes sense to me.
If the case evaluates true, then it executes the statement after the colon and before the break. So if the first case is not true, it checks the following cases.
This comment is hidden because it contains spoiler information about the solution
Loading more items...