kopia lustrzana https://github.com/martinlackner/apportionment
umlauts removed
rodzic
e9eb76b5e7
commit
b89d3a16fc
|
@ -2,15 +2,15 @@ from __future__ import print_function
|
|||
import apportionment
|
||||
|
||||
|
||||
distribution = [77, 22, 21, 10, 6]
|
||||
votes = [77, 22, 21, 10, 6]
|
||||
seats = 10
|
||||
|
||||
print("distribution", "."*(25 - len("distribution")), distribution, "\n")
|
||||
print("votes", "."*(25 - len("votes")), votes, "\n")
|
||||
|
||||
print(seats, "seats", "\n")
|
||||
|
||||
print("apportionment results:")
|
||||
for method in ["quota", "largest_remainder", "dhondt",
|
||||
"saintelague", "huntington", "adams"]:
|
||||
result = apportionment.method(method, distribution, seats, verbose=False)
|
||||
result = apportionment.method(method, votes, seats, verbose=False)
|
||||
print(method, "."*(25 - len(method)), result)
|
||||
|
|
Ładowanie…
Reference in New Issue