Simple Python script that calculates the number of seats according to the D'Hondt method.
- Python2 / Python3
You don't need to do anything with csv module since it is included in the Python installation.
-
Fill the columns after the "seats" column with the name of all parties.
-
Write the names of constituencies to the first column of each row and number of seats to the second column of each row.
-
If a party did not nominate a candidate in a constituency or did not receive votes, write 0 there. (Do not leave it blank!)
-
Run the
main.py
file.python main.py
- 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.