We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 320afe5 commit 18d3eb4Copy full SHA for 18d3eb4
PyElection/election_data.py
@@ -8,8 +8,9 @@ def average(numbers):
8
total += number
9
return total / length
10
11
+
12
+# ELECTION RESULTS ANALYSIS (results printed to terminal)
13
input_path = os.path.join('.',"election_data.csv")
-output_path = ('.', "election_results.txt")
14
15
with open(input_path, newline="") as csvfile:
16
csvreader = csv.reader(csvfile, delimiter=",")
@@ -71,4 +72,7 @@ def average(numbers):
71
72
elif Li > Correy and Li > Khan and Li > OTooley:
73
print("Winner: Li")
74
elif OTooley > Correy and OTooley > Li and OTooley > Khan:
- print("Winner: O'Tooley")
75
+ print("Winner: O'Tooley")
76
77
+# WRITE RESULTS TO TXT
78
+output_path = os.path.join('.', "election_results.txt")
0 commit comments