Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. def index_district():
  2.  
  3. district = input("Please enter district: ")
  4.  
  5. candidates = []
  6. var1 = 0
  7. while var1:
  8. var1 += 1
  9. candidates_names = input('Enter name of candidate. Hit enter again to end ')
  10. if candidates_names == '':
  11. break
  12. candidates.append(candidates_names)
  13.  
  14. votes = []
  15. var2 = 0
  16. while var2:
  17. var2 += 1
  18. candidates_votes = input('Enter number of votes. Hit enter again to end ')
  19. if candidates_votes == '':
  20. break
  21. votes.append(candidates_votes)
  22.  
  23. parties = []
  24. var3 = 0
  25. while var3:
  26. var3 += 1
  27. candidates_parties = input('Enter party. Hit enter again to end ')
  28. if candidates_parties == '':
  29. break
  30. parties.append(candidates_parties)
  31.  
  32. canidate_parties = dict(zip(parties, candidates))
  33.  
  34. party_votes = dict(zip(parties, votes))
  35.  
  36. print(canidate_parties)
  37. print(party_votes)
  38. print(district)
  39. #d1= canidate_parties, party_votes
  40.  
  41.  
  42.  
  43. index_district()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement