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
Release files for borda 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| borda-0.1.tar.gz | 4.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| borda-0.1-py2.7.egg | Legacy Egg format | - | - | Details |
Total release size: 15.3 kB
Release files / borda-0.1.tar.gz
| Download URL | borda-0.1.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c7942079d30977780a7296b4a7c4a721008cb20da36a71248b0775b57c16ca00
|
|
BLAKE2b-256 checksum How to use checksums |
183741aab560353b0ad0d8305ca90743505014bb6f88b63fc05d76f6a618202c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / borda-0.1-py2.7.egg
| Download URL | borda-0.1-py2.7.egg |
|---|---|
| Size | 11.1 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
6ed2f0e0432051ec69ce7a5a162d75ebeb61dd97abdfed6e4cc939811f4450cf
|
|
BLAKE2b-256 checksum How to use checksums |
1a4643eaf366b7211ae5bcffdd66c55e9b51b29e1e584c542c6e9b422a85a267
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |