Skip to content

Commit bf1d900

Browse files
committed
election results update
1 parent 6d2cbc6 commit bf1d900

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

PyElection/election_data.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,13 @@ def average(numbers):
8787
output_file.write("\n -------------------------------------------------------")
8888
output_file.write("\n Total Votes: " + str(vote_count))
8989
output_file.write("\n -------------------------------------------------------")
90-
output_file.write("Candidates receiving votes: " + list(candidates)[0] + ", " + list(candidates)[1] + ", " + list(candidates)[2] + ", " +list(candidates)[3])
91-
output_file.write("Khan: " + str(Khan_percentage) + "% (" + str(Khan) + " votes)")
92-
output_file.write("Correy: " + str(Correy_percentage) + "% (" + str(Correy) + " votes)")
93-
output_file.write("Li: " + str(Li_percentage) + "% (" + str(Li) + " votes)")
94-
output_file.write("O'Tooley: " + str(OTooley_percentage) + "% (" + str(OTooley) + " votes)")
95-
output_file.write("-------------------------------------------------------")
90+
output_file.write("\n Candidates receiving votes: " + list(candidates)[0] + ", " + list(candidates)[1] + ", " + list(candidates)[2] + ", " +list(candidates)[3])
91+
output_file.write("\n")
92+
output_file.write("\n Khan: " + str(Khan_percentage) + "% (" + str(Khan) + " votes)")
93+
output_file.write("\n Correy: " + str(Correy_percentage) + "% (" + str(Correy) + " votes)")
94+
output_file.write("\n Li: " + str(Li_percentage) + "% (" + str(Li) + " votes)")
95+
output_file.write("\n O'Tooley: " + str(OTooley_percentage) + "% (" + str(OTooley) + " votes)")
96+
output_file.write("\n -------------------------------------------------------")
9697
output_file.close()
9798

9899

PyElection/election_results.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
Election Results:
22
-------------------------------------------------------
33
Total Votes: 3521001
4-
-------------------------------------------------------Candidates receiving votes: Khan, Correy, Li, O'TooleyKhan: 63.0% (2218231 votes)Correy: 20.0% (704200 votes)Li: 14.0% (492940 votes)O'Tooley: 3.0% (105630 votes)-------------------------------------------------------
4+
-------------------------------------------------------
5+
Candidates receiving votes: Khan, Correy, Li, O'Tooley
6+
7+
Khan: 63.0% (2218231 votes)
8+
Correy: 20.0% (704200 votes)
9+
Li: 14.0% (492940 votes)
10+
O'Tooley: 3.0% (105630 votes)
11+
-------------------------------------------------------

0 commit comments

Comments
 (0)