Beta
Democracy Representation
26depperm
Loading description...
Mathematics
Algorithms
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
python new test framework is required. updated in this fork
This comment has been hidden.
description is incorrect/misleading:
zones
with the fewest representativesget
an additional representativezones
with the most representativeslose
a representativeThis comment has been hidden.
fixed
@depperm
,I'm not sure why you would mark this as resolved. The kata is still not compatible with Python 2.
I copied the suggested fix to the solution, and just barely to the Test Cases
@depperm
,Yep, the problem was you didn't add the lines to the solution in
Test Cases
. Seems to work fine for Python 2 now.Thanks!
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.?
I agree, this kata seems to be more about: "find out how the author rounded numbers"...
I added a clarifying bullet point, does this help or is more needed?
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!