Ad
  • Custom User Avatar

    The same happened with me. I had a similar code.
    The problem is with the second last line. Notice that population must be an integer, and cannot be a floating point number.
    So you need to convert the increment to an integer before you add it to p0.

  • Custom User Avatar

    Ah I see. Thanks for the response and a fun kata.

  • Custom User Avatar

    Please look at my post just below.

    both highest ranked solution and mine both say 3

    They are wrong. These "top" solutions passed until I added that test you mention and which was asked by some people (you can see corresponding posts below - again below..., sorry: I can't reproduce all posts... -).

  • Custom User Avatar

    I thought it was my code but ---> read on ...

    However, I got 'one of the top answers' to this kata and passed it through and guess what? it failed on exactly the same test and got exactly the same answer as mine.If in doubt grab code from my section 'solutions' and run both sets and see for yourself.

    I point you to this test with inputs ---> 1000 2.0 50 and 1214
    comes back as 'should be 4' however both highest ranked solution and mine both say 3.
    Small point but I think it will cause alot of people issues with this Kata. I respectfully submit that this should be looked into when people have time. Thank you.

  • Custom User Avatar

    When tests were updated and Python 3.8 enabled some old solutions that should have been invalidated were not; might be because there are too many solutions in that kata for the CW process?

  • Custom User Avatar

    Isn't there a way to fix the fact that there are katas on this site that have solutions that literally do not work anymore?

    1. Either we find out there should have been more tests to properly test the description, so tests are added and solutions that no longer pass are deleted. This seems like the best choice.

    2. Or just roll with it and change the description to allow for that.

    But not option 3, where we add tests later and leave old solutions up. The top solution on this kata literally doesn't work. Seems annoying if someone gives up (perhaps because he had problem with new tests) and the top solution just has same problem as they did.

    Not sure if author can do something with this, but just seems like a scenario that shouldn't be on the site at all.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution