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.
To everyone who thinks there is a broken test:
Read the description to the end!
This comment is hidden because it contains spoiler information about the solution
See the example in the description, at the end of the third year the population is 1213, not 1214.
How it is not broken? The requirement is "How many years does the town need to see its population greater than or equal to p"
if population rounded down is 1214 then it is equal to p which is 1214 right? And since the question is greater than OR EQUAL, then the test is broken.
The requirement is "How many years does the town need to see its population greater than or equal to p"
if p0 rounded down is 1214 then it is equal to p which is 1214 right? And since the question is greater than OR EQUAL, then the test is broken.
The way you did it, I think it will definitely reduce amount of complaints here. The final form I would maybe imagine a bit diferently: since it's a specific kind of input, I think it would deserve a separate
it
ordescribe
(something likeit("should handle fractional people correctly")
or similar), ideally more than one input, and ideally presenting inputs with a test title or with a failure message.But in general I personally will be happy with any change which will reduce the amount of exchanges like "[ISSUE] Tests are wrong" / "[RESOLVED] No errors in tests".
thanks for this kata I joyed