Skip to content

Commit c6e5bd9

Browse files
committed
final election results output code
1 parent bf1d900 commit c6e5bd9

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

PyElection/election_data.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ def average(numbers):
9494
output_file.write("\n Li: " + str(Li_percentage) + "% (" + str(Li) + " votes)")
9595
output_file.write("\n O'Tooley: " + str(OTooley_percentage) + "% (" + str(OTooley) + " votes)")
9696
output_file.write("\n -------------------------------------------------------")
97+
output_file.write("\n Winner: " + str(winner))
9798
output_file.close()
9899

99100

PyElection/election_results.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ Election Results:
88
Correy: 20.0% (704200 votes)
99
Li: 14.0% (492940 votes)
1010
O'Tooley: 3.0% (105630 votes)
11-
-------------------------------------------------------
11+
-------------------------------------------------------
12+
Winner: Khan

0 commit comments

Comments
 (0)