forked from Iankulani/2019-South-African-General-Election
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2019-South-African-Election.py
More file actions
641 lines (378 loc) · 30.2 KB
/
2019-South-African-Election.py
File metadata and controls
641 lines (378 loc) · 30.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
# -*- coding: utf-8 -*-
"""
Created on Mon May 6 15:47:35 2024
@author: IAN CARTER KULANI
Phone:+265(0)988061969
E-mail:iancarterkulani@gmail.com
Purpose: The software prompts the user to enter total number of published centers,total
number of registered voters, total number of null and void votes, total number of valid votes and total valid votes for each candidate. Afterward,it determines the candidate with the majority of votes
and displays the results on the screen.
#NOTE:For a candidate to be a majority winner of an election, the candidate total valid votes should
be greater than majority votes, which is Fifty plus one.
"""
print("=========================================SOUTH AFRICA 2019 PRESIDENTIAL ELECTION=========================================\n\n")
#Get total number of published centers
percent=100
Totalpublishedcenters=int(input("Enter Total published centers:"))
#Get the total number of registered votes
TotalRegisteredvotes=int(input("Enter Total Registered Voters/Turnout:"))
Totalvotescast=int(input("Enter Total Votes Cast/Total Votes:"))
#Get total number of Null_&_Void votes
Nullandvoid=int(input("Enter Total Null_&_Void Votes/Invalid Votes:"))
#Get Total Valid Votes
Totalvalidvotes=int(input("Enter Total Valid Votes:"))
#Get Total Valid Votes for African National Congress
Totalvalidvotesfor_African_National_Congress=int(input("Enter Total Valid Votes for African National Congress: "))
#Get Total Valid Votes for Democratic Alliance
Totalvalidvotesfor_Democratic_Alliance=int(input("Enter Total Valid Votes for Democratic Alliance:"))
#Get Total Valid Votes for Economic Freedom Fighters
Totalvalidvotesfor_Economic_Freedom_Fighters=int(input("Enter Total Valid Votes for Economic Freedom Fighters:"))
#Get Total Valid Votes for Inkatha Freedom Party
Totalvalidvotesfor_Inkatha_Freedom_Party=int(input("Enter Total Valid Votes for Inkatha Freedom Party:"))
#Get Total Vald Votes for Freedom Front Plus
Totalvalidvotesfor_Freedom_Front_Plus=int(input("Enter Total Valid Votes for Freedom Front Plus:"))
#Get Total Vald Votes for African Christian Democratic Party
Totalvalidvotesfor_African_Christian_Democratic_Party=int(input("Enter Total Valid Votes for African Christian Democratic Party:"))
#Get Total Valid Votes for United Democratic Movement
Totalvalidvotesfor_United_Democratic_Movement=int(input("Enter Total Valid Votes for United Democratic Movement:"))
#Get Total Valid Votes for African Transformation Movement
Totalvalidvotesfor_African_Transformation_Movement=int(input("Enter Total Valid Votes for African Transformation Movement:"))
#Get Total Valid Votes for Good
Totalvalidvotesfor_Good=int(input("Enter Total Valid Votes for Good:"))
#Get Total Valid Votes for National Freedom Party
Totalvalidvotesfor_National_Freedom_Party=int(input("Enter Total Valid Votes for National Freedom Party:"))
#Get Total Valid Votes for African Independent Congress
Totalvalidvotesfor_African_Independent_Congress=int(input("Enter Total Valid Votes for African Independent Congress:"))
#Get Total Valid Votes for Congress of the people
Totalvalidvotesfor_Congress_of_the_People=int(input("Enter Total Valid Votes for Congress of the people:"))
#Get Total Vald Votes for Pan Africanist Congress
Totalvalidvotesfor_Pan_Africanist_Congress=int(input("Enter Total Valid Votes for Pan Africanist Congress:"))
#Get Total Valid Votes for Al Jamal-Ah
Totalvalidvotesfor_Al_Jamal_Ah=int(input("Enter Total Valid Votes for Al Jamal Ah:"))
#Get Total Valid Votes for African Security Congress
Totalvalidvotesfor_African_Security_Congress=int(input("Enter Total Valid Votes for African Security Congress:"))
#Get Total Valid Votes for Socialist Revolutionary Workers Party
Totalvalidvotesfor_Socialist_Revolutionary_Workers_Party=int(input("Enter Total Valid Votes for Socialist Revolutionary Workers Party:"))
#Get Total Valid Votes for Black First Land First
Totalvalidvotesfor_Black_First_Land_First=int(input("Enter Total Valid Votes for Black First Land First:"))
#Get Total Valid Votes for African People's Convention
Totalvalidvotesfor_African_Peoples_Convention=int(input("Enter Total Valid Votes for African People's Convention:"))
#Get Total Valid Votes for African Alliance of Social Democrats
Totalvalidvotesfor_African_Alliance_of_Social_Democrats=int(input("Enter Total Valid Votes for African Alliance of Social Democrats:"))
#Get Total Valid Votes for Capitalist Party of South Africa
Totalvalidvotesfor_Capitalist_Party_of_South_Africa=int(input("Enter Total Valid Votes for Capitalist Party of South Africa:"))
#Get Total Valid Votes for Alliance for Transformation for All
Totalvalidvotesfor_Alliance_for_Transformation_for_All=int(input("Enter Total Valid Votes for Alliance for Transformation for All:"))
#Get Total Valid Votes for Agang South Africa
Totalvalidvotesfor_Agang_South_Africa=int(input("Enter Total Valid Votes for Agang South Africa:"))
#Get Total Vald Votes for Azanian People's Organisation
Totalvalidvotesfor_Azanian_Peoples_Organisation=int(input("Enter Total Valid Votes for Azanian People's Organisation:"))
#Get Total Vald Votes for Independent Civic Organisation
Totalvalidvotesfor_Independent_Civic_Organisation=int(input("Enter Total Valid Votes for Independent Civic Organisation:"))
#Get Total Vald Votes for Minolity Front
Totalvalidvotesfor_Minolity_Front=int(input("Enter Total Valid Votes for Minolity Front:"))
#Get Total Vaild Votes for Democratic Liberal Congress
Totalvalidvotesfor_Democratic_Liberal_Congress=int(input("Enter Total Valid Votes for Democratic Liberal Congress:"))
# Get Total Valid Votes for Better Residents Association
Totalvalidvotesfor_Better_Residents_Association=int(input("Enter Total Valid Votes for Better Residents Association:"))
#Get Total Vaild Votes for Forum For Services Delivery
Totalvalidvotesfor_Forum_For_Services_Delivery=int(input("Enter Total Valid Votes for Forum For Services Delivery:"))
#Get Total Valid Votes for Front National
Totalvalidvotesfor_Front_National=int(input("Enter Total Valid Votes for Front National:"))
#Get Total Valid Votes for Land Party
Totalvalidvotesfor_Land_Party=int(input("Enter Total Valid Votes for Land Party:"))
#Get Total Valid Votes for African Convenant
Totalvalidvotesfor_African_Convenant=int(input("Enter Total Valid Votes for African Convenant:"))
#Get Total Valid Votes for Patriotic Alliance
Totalvalidvotesfor_Patriotic_Alliance=int(input("Enter Total Valid Votes for Patriotic Alliance:"))
#Get Total Valid Votes for Africa Democratic Change
Totalvalidvotesfor_African_Democratic_Change=int(input("Enter Total Valid Votes for Africa Democratic Change:"))
#Get Total Valid Votes for Economic Emanapation Forum
Totalvalidvotesfor_Economic_Emanapation_Forum=int(input("Enter Total Valid Votes for Economic Emanapation Forum:"))
#Get Total Valid Votes for Women Foward
Totalvalidvotesfor_Women_Foward=int(input("Enter Total Valid Votes for Women Foward:"))
#Get Total Valid Votes for Christian Political Movement
Totalvalidvotesfor_Christian_Political_Movement=int(input("Enter Total Valid Votes for Christian Political Movement:"))
#Get Total Valid Votes for African Content Movement
Totalvalidvotesfor_African_Content_Movement=int(input("Enter Total Valid Votes for African Content Movement:"))
#Get Total Valid Votes for International Revelation Congress
Totalvalidvotesfor_International_Revelation_Congress=int(input("Enter Total Valid Votes for International Revelation Congress:"))
#Get Total Valid Votes for National People Front
Totalvalidvotesfor_National_People_Front=int(input("Enter Total Valid Votes for National People Front:"))
#Get Total Valid Votes for African Reinaissance Unity Party
Totalvalidvotesfor_African_Reinaissance_Unity_Party=int(input("Enter Total Valid Votes for African Reinaissance Unity Party:"))
#Get Total Valid Votes for African Congress of Democrats
Totalvalidvotesfor_African_Congress_of_Democrats=int(input("Enter Total Valid Votes for African Congress of Democrats:"))
#Get Total Valid Votes for South Africa National Congress of Traditional Authorities
Totalvalidvotesfor_South_Africa_National_Congress_of_Traditional_Authorities=int(input("Enter Total Valid Votes for South Africa National Congress of Traditional Authorities:"))
#Get Total Valid Votes for Compatriots of South Africa
Totalvalidvotesfor_Compatriots_of_South_Africa=int(input("Enter Total Valid Votes for Compatriots of South Africa:"))
#Get Total Valid Votes for People's Revolutionary Movement
Totalvalidvotesfor_Peoples_Revolutionary_Movement=int(input("Enter Total Valid Votes for People's Revolutionary Movement:"))
#Get Total Valid Votes for Power of African Unity
Totalvalidvotesfor_Power_of_African_Unity=int(input("Enter Total Valid Votes for Power of African Unity:"))
#Get Total Valid Votes for Free Democrats
Totalvalidvotesfor_Free_Democrats=int(input("Enter Total Valid Votes for Free Democrats:"))
#Get Total Valid Votes for South African Maintainance and Estate Beneficiaries Association
Totalvalidvotesfor_South_African_Maintainance_and_Estate_Beneficiaries_Association=int(input("Enter Total Valid Votes for South African Maintainance and Estate Beneficiaries Association:"))
#Get Total Valid Votes for National People's Ambassodors
Totalvalidvotesfor_National_Peoples_Ambassodors=int(input("Enter Total Valid Votes for National People's Ambassodors:"))
#Decision Making
if Totalvalidvotesfor_African_National_Congress>Totalvalidvotes/2+1 :
print("Congratulations to the African National Congress For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Democratic_Alliance>Totalvalidvotes/2+1:
print("Congratulations to the Democratic Alliance For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Economic_Freedom_Fighters>Totalvalidvotes/2+1:
print("Congratulations to the Economic Freedom Fighters For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Inkatha_Freedom_Party>Totalvalidvotes/2+1 :
print("Congratulations to theInkatha Freedom Party For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Freedom_Front_Plus>Totalvalidvotes/2+1:
print("Congratulations to the Freedom Front Plus For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_African_Christian_Democratic_Party>Totalvalidvotes/2+1:
print("Congratulations to the African Christian Democratic Party For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_United_Democratic_Movement>Totalvalidvotes/2+1:
print("Congratulations to United Democratic Movement For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_African_Transformation_Movement>Totalvalidvotes/2+1 :
print("Congratulations to the African Transformation Movement For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Good>Totalvalidvotes/2+1:
print("Congratulations to the Good For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_African_Independent_Congress>Totalvalidvotes/2+1:
print("Congratulations to the African Independent Congress For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Congress_of_the_People>Totalvalidvotes/2+1:
print("Congratulations to Congress of the People For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Pan_Africanist_Congress>Totalvalidvotes/2+1:
print("Congratulations to the Pan Africanist Congress For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Al_Jamal_Ah>Totalvalidvotes/2+1 :
print("Congratulations to the Al Jamal-Ah For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_African_Security_Congress>Totalvalidvotes/2+1:
print("Congratulations to the African Security Congress For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Socialist_Revolutionary_Workers_Party>Totalvalidvotes/2+1:
print("Cogratulations Socialist Revolutionary Workers Party For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Black_First_Land_First>Totalvalidvotes/2+1 :
print("Congratulations to the Black First Land First For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_African_Peoples_Convention>Totalvalidvotes/2+1:
print("Congratulations to the African Peoples Convention For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_African_Alliance_of_Social_Democrats>Totalvalidvotes/2+1:
print("Congratulations to the African Alliance of Social Democrats For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Capitalist_Party_of_South_Africa>Totalvalidvotes/2+1 :
print("Congratulations to the Capitalist Party of South Africa For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Alliance_for_Transformation_for_All>Totalvalidvotes/2+1:
print("Congratulations to theAlliance for Transformation for All For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Agang_South_Africa>Totalvalidvotes/2+1:
print("Congratulations to the Agang South Africa For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Azanian_Peoples_Organisation>Totalvalidvotes/2+1:
print("Congratulations to the Azanian People's Organisation For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Independent_Civic_Organisation>Totalvalidvotes/2+1:
print("Congratulations to the Independent Civic Organisation For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Minolity_Front>Totalvalidvotes/2+1 :
print("Congratulations to the Minolity Front For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Democratic_Liberal_Congress>Totalvalidvotes/2+1:
print("Congratulations to the Democratic Liberal Congress For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Better_Residents_Association>Totalvalidvotes/2+1:
print("Congratulations to the Better Residents Association For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Forum_For_Services_Delivery>Totalvalidvotes/2+1 :
print("Congratulations to the Forum For Services Delivery For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Front_National>Totalvalidvotes/2+1:
print("Congratulations to the Front National For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Land_Party>Totalvalidvotes/2+1:
print("Congratulations to Land Party For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_African_Convenant>Totalvalidvotes/2+1:
print("Congratulations to African Convenant For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Patriotic_Alliance>Totalvalidvotes/2+1:
print("Congratulations to Patriotic Alliance For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_African_Democratic_Change>Totalvalidvotes/2+1:
print("Congratulations to African Democratic Change For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Economic_Emanapation_Forum>Totalvalidvotes/2+1:
print("Congratulations to Economic Emanapation Forum Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Women_Foward>Totalvalidvotes/2+1:
print("Congratulations to Women Foward For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Christian_Political_Movement>Totalvalidvotes/2+1:
print("Congratulations to Christian Political Movement For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_African_Content_Movement>Totalvalidvotes/2+1:
print("Congratulations to African Content Movement For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_International_Revelation_Congress>Totalvalidvotes/2+1:
print("Congratulations to International Revelation Congress For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_National_People_Front>Totalvalidvotes/2+1:
print("Congratulations to the National People Front you're a winner of 1994 election\n\n")
elif Totalvalidvotesfor_African_Reinaissance_Unity_Party>Totalvalidvotes/2+1:
print("Congratulations to the African Reinaissance Unity Party For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_African_Congress_of_Democrats>Totalvalidvotes/2+1 :
print("Congratulations to the African Congress of Democrats For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_South_Africa_National_Congress_of_Traditional_Authorities>Totalvalidvotes/2+1:
print("Congratulations to the South Africa National Congress of Traditional Authorities For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Compatriots_of_South_Africa>Totalvalidvotes/2+1:
print("Congratulations to the Compatriots of South Africa Forum For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Peoples_Revolutionary_Movement>Totalvalidvotes/2+1 :
print("Congratulations to the People's Revolutionary Movement For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Power_of_African_Unity>Totalvalidvotes/2+1:
print("Congratulations to the Power of African_Unity For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_Free_Democrats>Totalvalidvotes/2+1:
print("Congratulations to the Free Democrats For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_South_African_Maintainance_and_Estate_Beneficiaries_Association>Totalvalidvotes/2+1 :
print("Congratulations to theSouth African Maintainance and Estate Beneficiaries Associationt For Winning 2019 Election\n\n")
elif Totalvalidvotesfor_National_Peoples_Ambassodors>Totalvalidvotes/2+1:
print("Congratulations to the National People's Ambassodor For Winning 2019 Election\n\n")
else:
print("No majority winner was found RUNOFF may be required\n")
print("__________________________________________________________ELECTION STATISTICS__________________________________________________________\n")
#calculating percentage
#Calculating percentage for total votes cast
Percentage=round(Totalvalidvotes*percent/Totalvalidvotes, 2);
print("Total Votes Cast in percentage=",Percentage)
#Calculating percentage for total valid votes for all canidates
Percentage=round(Totalvalidvotes*percent/Totalvotescast, 2);
print("Total Valid Votes for all candidtes in percentage=",Percentage)
#Calculating percentage for null_&_void votes
Percentage=round(Nullandvoid*percent/Totalvalidvotes, 2);
print("Total Null_&_Void votes in percentage=",Percentage)
#Calculating percentage for Total Registered voters/turnout
Percentage=round(Totalvotescast*percent/TotalRegisteredvotes, 2);
print("Total Registered voters/turnout in percentage=",Percentage)
#Calculating percentage for African National Congress
Percentage=round(Totalvalidvotesfor_African_National_Congress*percent/Totalvalidvotes, 2);
print("Total Valid Votes for African National Congress in Percentage=",Percentage)
#Calculating percentage for Democratic Alliance
Percentage=round(Totalvalidvotesfor_Democratic_Alliance*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Democratic Alliance in percentage=",Percentage)
#Calculating percentage for Economic Freedom Fighters
Percentage=round(Totalvalidvotesfor_Economic_Freedom_Fighters*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Economic Freedom Fighter's in percentage=",Percentage)
#Calculating percentage for Inkatha Freedom Party
Percentage=round(Totalvalidvotesfor_Inkatha_Freedom_Party*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Inkatha Freedom Party in percentage=",Percentage)
#Calculating percentage for Freedom Front Plus
Percentage=round(Totalvalidvotesfor_Freedom_Front_Plus*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Freedom Front Plus in Percentage=",Percentage)
#Calculating percentage for African Christian Democratic Party
Percentage=round(Totalvalidvotesfor_African_Christian_Democratic_Party*percent/Totalvalidvotes, 2);
print("Total Valid Votes for African Christian Democratic Party in percentage=",Percentage)
#Calculating percentage for United_Democratic_Movement
Percentage=round(Totalvalidvotesfor_United_Democratic_Movement*percent/Totalvalidvotes, 2);
print("Total Valid Votes for United Democratic Movement in percentage=",Percentage)
#Calculating percentage for African Transformation_Movement
Percentage=round(Totalvalidvotesfor_African_Transformation_Movement*percent/Totalvalidvotes, 2);
print("Total Valid Votes for African Transformation Movement in Percentage=",Percentage)
#Calculating percentage for Good
Percentage=round(Totalvalidvotesfor_Good*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Good in percentage=",Percentage)
#Calculating percentage for National Freedom Party
Percentage=round(Totalvalidvotesfor_National_Freedom_Party*percent/Totalvalidvotes, 2);
print("Total Valid Votes for National Freedom Party in percentage=",Percentage)
#Calculating percentage for African Independent Congress
Percentage=round(Totalvalidvotesfor_African_Independent_Congress*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Africa African Independent Congress in Percentage=",Percentage)
#Calculating percentage for Congress of the People
Percentage=round(Totalvalidvotesfor_Congress_of_the_People*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Congress of the People in Percentage=",Percentage)
#Calculating percentage for African Moderates_Congress Party
Percentage=round(Totalvalidvotesfor_Pan_Africanist_Congress*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Pan Africanist Congress in percentage=",Percentage)
#Calculating percentage for Al_Jamal_Ah
Percentage=round(Totalvalidvotesfor_Al_Jamal_Ah*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Al_Jamal_Ah in percentage=",Percentage)
#Calculating percentage forAfrican Security Congress
Percentage=round(Totalvalidvotesfor_African_Security_Congress*percent/Totalvalidvotes, 2);
print("Total Valid Votes forAfrican Security Congress in percentage=",Percentage)
#Calculating percentage forSocialist Revolutionary Workers Party
Percentage=round(Totalvalidvotesfor_Socialist_Revolutionary_Workers_Party*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Socialist Revolutionary Workers_Party in percentage=",Percentage)
#Calculating percentage for Black First Land First
Percentage=round(Totalvalidvotesfor_Black_First_Land_First*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Black First Land First in Percentage=",Percentage)
#Calculating percentage for African People's Convention
Percentage=round(Totalvalidvotesfor_African_Peoples_Convention*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Africa African People's Convention in percentage=",Percentage)
#Calculating percentage for African_Alliance of Social Democrats
Percentage=round(Totalvalidvotesfor_African_Alliance_of_Social_Democrats*percent/Totalvalidvotes, 2);
print("Total Valid Votes for African Alliance of Social Democrats in percentage=",Percentage)
#Calculating percentage for Capitalist Party of South Africa
Percentage=round(Totalvalidvotesfor_Capitalist_Party_of_South_Africa*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Capitalist Party of South Africa in Percentage=",Percentage)
#Calculating percentage for Alliance for Transformation for All
Percentage=round(Totalvalidvotesfor_Alliance_for_Transformation_for_All*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Alliance for Transformation for All in percentage=",Percentage)
#Calculating percentage for A gang South
Percentage=round(Totalvalidvotesfor_Agang_South_Africa*percent/Totalvalidvotes, 2);
print("Total Valid Votes for A gang South Africa in percentage=",Percentage)
#Calculating percentage for Azanian Peoples Organisation
Percentage=round(Totalvalidvotesfor_Azanian_Peoples_Organisation*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Azanian Peoples Organisation in percentage=",Percentage)
#Calculating percentage for Independent Civic Organisation
Percentage=round(Totalvalidvotesfor_Independent_Civic_Organisation*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Independent Civic Organisation in percentage=",Percentage)
#Calculating percentage for Minolity Front
Percentage=round(Totalvalidvotesfor_Minolity_Front*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Minolity Front in percentage=",Percentage)
#Calculating percentage for Democratic Liberal Congress
Percentage=round(Totalvalidvotesfor_Democratic_Liberal_Congress*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Democratic Liberal Congress in percentage=",Percentage)
#Calculating percentage for Better Residents Association
Percentage=round(Totalvalidvotesfor_Better_Residents_Association*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Better Residents Association in percentage=",Percentage)
#Calculating percentage for Forum For Services Delivery
Percentage=round(Totalvalidvotesfor_Forum_For_Services_Delivery*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Forum For Services Delivery in percentage=",Percentage)
#Calculating percentage for Front National
Percentage=round(Totalvalidvotesfor_Front_National*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Front National in percentage=",Percentage)
#Calculating percentage for Land Party
Percentage=round(Totalvalidvotesfor_Land_Party*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Land Party in percentage=",Percentage)
#Calculating percentage for African Convenant
Percentage=round(Totalvalidvotesfor_African_Convenant*percent/Totalvalidvotes, 2);
print("Total Valid Votes for African Convenant in percentage=",Percentage)
#Calculating percentage for Patriotic Alliance
Percentage=round(Totalvalidvotesfor_Patriotic_Alliance*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Patriotic Alliance in percentage=",Percentage)
#Calculating percentage for Africa Democratic Change
Percentage=round(Totalvalidvotesfor_African_Democratic_Change*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Africa Democratic Change in percentage=",Percentage)
#Calculating percentage for Economic Emanapation Forum
Percentage=round(Totalvalidvotesfor_Economic_Emanapation_Forum*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Economic Emanapation Forum in percentage=",Percentage)
#Calculating percentage for Women Foward
Percentage=round(Totalvalidvotesfor_Women_Foward*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Women Foward in percentage=",Percentage)
#Calculating percentage for Christian Political Movement
Percentage=round(Totalvalidvotesfor_Christian_Political_Movement*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Christian Political Movement in percentage=",Percentage)
#Calculating percentage for African Content Movement
Percentage=round(Totalvalidvotesfor_African_Content_Movement*percent/Totalvalidvotes, 2);
print("Total Valid Votes for African Content Movement in percentage=",Percentage)
#Calculating percentage for International Revelation Congress
Percentage=round(Totalvalidvotesfor_International_Revelation_Congress*percent/Totalvalidvotes, 2);
print("Total Valid Votes for International Revelation Congress in percentage=",Percentage)
#Calculating percentage for Patriotic Alliance
Percentage=round(Totalvalidvotesfor_Patriotic_Alliance*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Patriotic Alliance in percentage=",Percentage)
#Calculating percentage for National People Front
Percentage=round(Totalvalidvotesfor_National_People_Front*percent/Totalvalidvotes, 2);
print("Total Valid Votes for National People Front in percentage=",Percentage)
#Calculating percentage for African Reinaissance Unity Party
Percentage=round(Totalvalidvotesfor_African_Reinaissance_Unity_Party*percent/Totalvalidvotes, 2);
print("Total Valid Votes for African Reinaissance Unity Party in percentage=",Percentage)
#Calculating percentage for African_Congress_of_Democrats
Percentage=round(Totalvalidvotesfor_African_Congress_of_Democrats*percent/Totalvalidvotes, 2);
print("Total Valid Votes for African Congress of Democrats in percentage=",Percentage)
#Calculating percentage for South Africa National Congress of Traditional Authorities
Percentage=round(Totalvalidvotesfor_South_Africa_National_Congress_of_Traditional_Authorities*percent/Totalvalidvotes, 2);
print("Total Valid Votes for South Africa National Congress of Traditional Authorities in percentage=",Percentage)
#Calculating percentage for Compatriots of South Africa
Percentage=round(Totalvalidvotesfor_Compatriots_of_South_Africa*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Compatriots of South Africa in percentage=",Percentage)
#Calculating percentage for Peoples Revolutionary Movement
Percentage=round(Totalvalidvotesfor_Peoples_Revolutionary_Movement*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Peoples Revolutionary Movement percentage=",Percentage)
#Calculating percentage for Power_of_African_Unity
Percentage=round(Totalvalidvotesfor_Power_of_African_Unity*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Power of African Unity in percentage=",Percentage)
#Calculating percentage for Democrats
Percentage=round(Totalvalidvotesfor_Free_Democrats*percent/Totalvalidvotes, 2);
print("Total Valid Votes for Democrats in percentage=",Percentage)
#Calculating percentage for South African Maintainance and Estate Beneficiaries Association
Percentage=round(Totalvalidvotesfor_South_African_Maintainance_and_Estate_Beneficiaries_Association*percent/Totalvalidvotes, 2);
print("Total Valid Votes for South African Maintainance and Estate Beneficiaries Association in percentage=",Percentage)
#Calculating percentage for National_Peoples_Ambassodors
Percentage=round(Totalvalidvotesfor_National_Peoples_Ambassodors*percent/Totalvalidvotes, 2);
print("Total Valid Votes for National Peoples Ambassodors in percentage=",Percentage)
print("=========================================================================================================================\n")