Skip to content

Python script that calculates the number of seats according to the D'Hondt method. (İllerdeki oylardan milletvekili sayısı hesaplama)

License

Notifications You must be signed in to change notification settings

melihakpinar/PyHondt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyHondt

Simple Python script that calculates the number of seats according to the D'Hondt method.


Prerequisites

  • Python2 / Python3

You don't need to do anything with csv module since it is included in the Python installation.


Usage

  1. Fill the columns after the "seats" column with the name of all parties.

  2. Write the names of constituencies to the first column of each row and number of seats to the second column of each row.

  3. If a party did not nominate a candidate in a constituency or did not receive votes, write 0 there. (Do not leave it blank!)

  4. Run the main.py file.

    python main.py

Input / Output

Sample Input

Sample Input

Sample Output

Sample Output


Special notes on Turkish election system:

  • sample_input.csv dosyasındaki bölgeler ve koltuk sayıları Mart 2021 tarihli YSK kararından alınmıştır. Zaman içerisinde nüfus değişimine göre değişiklik gösterebilir.

About

Python script that calculates the number of seats according to the D'Hondt method. (İllerdeki oylardan milletvekili sayısı hesaplama)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages