kopia lustrzana https://github.com/martinlackner/apportionment
new example, all methods different
rodzic
7c182d6226
commit
92ac4244a6
|
@ -1,8 +1,8 @@
|
|||
from __future__ import print_function
|
||||
import apportionment.methods as app
|
||||
|
||||
votes = [77, 22, 21, 10, 6]
|
||||
seats = 10
|
||||
votes = [1, 3, 6, 7, 78]
|
||||
seats = 20
|
||||
|
||||
print("votes", "."*(25 - len("votes")), votes, "\n")
|
||||
|
||||
|
@ -10,6 +10,6 @@ print(seats, "seats", "\n")
|
|||
|
||||
print("apportionment results:")
|
||||
for method in ["quota", "largest_remainder", "dhondt",
|
||||
"saintelague", "huntington", "adams"]:
|
||||
"saintelague", "huntington", "adams", "dean"]:
|
||||
result = app.compute(method, votes, seats, verbose=False)
|
||||
print(method, "."*(25 - len(method)), result)
|
||||
|
|
Ładowanie…
Reference in New Issue