Plurality Voting

First Past the Post

>>> from ballotbox.ballot import BallotBox
>>> from ballotbox.singlewinner.plurality import FirstPastPostVoting
>>> bb = BallotBox(method=FirstPastPostVoting)
>>> bb.batch_votes([("alice", 4000), ("bob", 3000), ("carol", 5000)])
>>> bb.get_winner(position_count=1)
[(5000, 'carol')]
>>> bb.get_winner(position_count=2)
[(5000, 'carol'), (4000, 'alice')]
>>> bb.get_winner(position_count=3)
[(5000, 'carol'), (4000, 'alice'), (3000, 'bob')]

Table Of Contents

Previous topic

<no title>

Next topic

Preferential

This Page