Ad
  • Custom User Avatar

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

  • Custom User Avatar

    Finally it makes sense why I was only failing 1 test. Thank you for commenting this.

  • Default User Avatar

    Description modified though it was already written:

    "... the function nb_year should return n number of entire years needed to get a population greater or equal to p."

  • Default User Avatar

    Ones passed, can have problems before solving with just sorting through different options, insted of making a deliberate decision.
    For me it was statement to surpass (overcome, means greater than), then statement oposite to this in middle of desc. in "More generally given parameters:".
    Imo, if there was less description, but it says only: "Tell how many years it will take to initial population (p0) to become greater or equal to goal (p), don't forget about fact, that people can't be added by "partitions", drop any not full ones through population increase." It will be clearer.

  • Default User Avatar

    For me "surpass" is a synonym of "greater or equal" but I am not a native speaker. Do you have something better to propose?
    I note that 117,209 people who passed the kata did'nt see a problem here (though some had problems elsewhere). Can you say with which input you make a mistake?

  • Default User Avatar

    At top of desc. it says how many year for p0 become "greater or equal" to p.
    And only after example it says that p is population to surpass.

    So was my pain to solve it for 1 mistake for 205 other tests passed (50 instead of 51).

  • Default User Avatar

    need to replace len(numbers) with (len(numbers) or 1) to cover empty arrays.