Beta

Democracy Representation

Description
Loading description...
Mathematics
Algorithms
View
AllIssues3QuestionsSuggestions2Show Resolved
  • Please sign in or sign up to leave a comment.
  • saudiGuy Avatar

    python new test framework is required. updated in this fork

  • Voile Avatar

    This comment has been hidden.

  • Blind4Basics Avatar

    description is incorrect/misleading:

    • if the calculated number of representatives is less then the requirement the first zones with the fewest representatives get an additional representative
    • if the calculated number of representatives is more than the requirement the first zones with the most representatives lose a representative
  • zebulan Avatar

    This comment has been hidden.

  • tachyonlabs Avatar

    Do you want to say a little more about which apportionment method your kata is using, how you're supposed to handle rounding, whether each zone starts with one representative and then the remaining are distributed proportionally, or whether they are distributed proportionally and then any zones with zero get one from the zone with the largest number of representatives, etc.?

    • mmalkavian Avatar

      I agree, this kata seems to be more about: "find out how the author rounded numbers"...

    • depperm Avatar

      I added a clarifying bullet point, does this help or is more needed?

    • tachyonlabs Avatar

      Thanks, that helped, I solved it now. :-) Part it was just that you've got the Python 3 banker's rounding going, where .5 gets rounded to the nearest even number rather than rounded up, which is why your first example comes out as [5,3,2,10] rather than [5,3,3,9]. Which I guess is more and more the standard rounding behavior, so I need to get used to it!