Voting system based on the Borda counting scheme
Project description
The Borda count is a single-winner election method in which voters rank candidates in order of preference. The Borda count determines the winner of an election by giving each candidate a certain number of points corresponding to the position in which he or she is ranked by each voter. Once all votes have been counted the candidate with the most points is the winner. Because it sometimes elects broadly acceptable candidates, rather than those preferred by the majority, the Borda count is often described as a consensus-based electoral system, rather than a majoritarian one.
>>> import borda.count >>> who_is_superman = borda.count.Election()>>> calisto = borda.count.Candidate('calisto') >>> calvin = borda.count.Candidate('calvin') >>> clark = borda.count.Candidate('clark') >>> who_is_superman.set_candidates([calisto, calvin]) >>> who_is_superman.add_candidate(clark)>>> valentine = borda.count.Voter(who_is_superman, 'valentine') >>> veronica = borda.count.Voter(who_is_superman, 'veronica')>>> valentine.votes([clark, calisto, calvin]) >>> veronica.votes([clark, calvin, calisto])>>> who_is_superman.get_winner() is clark True
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file borda-0.1.tar.gz
.
File metadata
- Download URL: borda-0.1.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7942079d30977780a7296b4a7c4a721008cb20da36a71248b0775b57c16ca00 |
|
MD5 | 0a499d971a004e046c418cf5619c9580 |
|
BLAKE2b-256 | 183741aab560353b0ad0d8305ca90743505014bb6f88b63fc05d76f6a618202c |
File details
Details for the file borda-0.1-py2.7.egg
.
File metadata
- Download URL: borda-0.1-py2.7.egg
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ed2f0e0432051ec69ce7a5a162d75ebeb61dd97abdfed6e4cc939811f4450cf |
|
MD5 | 40bd36649ff1840b8184ae16b4261964 |
|
BLAKE2b-256 | 1a4643eaf366b7211ae5bcffdd66c55e9b51b29e1e584c542c6e9b422a85a267 |