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 problem says equal or greater, taking the integer part of 1241.228 give us the result of 3 years,
I think it is an error in the test case
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
Take a look at the current javascript version, added the edge case to sample tests and an error message that maybe applies to both tests.
This comment is hidden because it contains spoiler information about the solution
I agree there should be at least 10 edge cases tests, and if they were random, that would be perfect.
Also adding the current edge case to the sample tests with a proper error message would help.
But where did I say "nyah, get lost"? I just pointed out what the misconception in his calculation was. Once he sees that it's trivial to fix it. It's even in the description:
In the terms this problem is written, population is a succession, not a continuos function. Each term is calculated using the previous one and all of them are integers.
To be frank, i do not really care what are the actual definitions used by the kata, as long as they are clear, and enforced well. Those are, as you say, just definitions, and users should adhere to them. What i find problematic is that unclear definitions are a source of abnormal amount of support requested, users are constantly said to fuck off, and all burden of handling issues is delegated to helpers who are said "if you are bothered by helping, maybe you should reconsider your carreer here". And all of this because inclarities of the task have been declared as "skill issue".
"there is no problem with kata" is quite a stupid thing to say if the kata receives issues regularly, and almost daily. There is a problem, and if its not the definition, them maybe its something else. And there is definitely a fix other than constantly repeating "nyah, get lost". The fact that there is just a single fixed test which fails incorrect solutions strengtens the bad experience even more.
I don't know how census works where you live, but here, they count alive fully developed people. They don't count people to be born. You work with static data taken at the end of each period, in this case, a year. Could we agree that saying population increases 2% each year is an approximation and that it is not evenly distributed along the year? Because it seems you're thinking it is a continuos function and at a middle point there should be exactly X population if you divide it in month or weeks.
But next years people do not come from the previous year report. The next years people come from the previous years people :)
The report is made each year. And the next year you use the previous report to do the calculations. Isn't that shown in the description?
Loading more items...