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
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".
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?
It's obvious that the sign will not list the "fractional, not fully developed" people, you are right here. But what your analogy lacks is the fact that even if the sign says "Here live 10000", the currently existing "fractional, not fully developed" people still contribute towards the next years population. The sign rounds the presentation, and not the actual state.
@Hobovsky How many population has a city in a year? Until you show me a sign that says 10000.25 I'll keep saying there is no fractional people, period.
It calculated 1.5 issues/week. However, I probably, maybe, possibly, uncertainly, likely used intermediate fractions in calculating the average, so you might actually be right, or even more wrong, would have to ask the author.
I agree with hobovsky. Changing the period, changes the result, which is insane. Rounding/Flooring should only be applied when reporting, not when calculating.
Loading more items...