Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def index_district():
- district = input("Please enter district: ")
- candidates = []
- var1 = 0
- while var1:
- var1 += 1
- candidates_names = input('Enter name of candidate. Hit enter again to end ')
- if candidates_names == '':
- break
- candidates.append(candidates_names)
- votes = []
- var2 = 0
- while var2:
- var2 += 1
- candidates_votes = input('Enter number of votes. Hit enter again to end ')
- if candidates_votes == '':
- break
- votes.append(candidates_votes)
- parties = []
- var3 = 0
- while var3:
- var3 += 1
- candidates_parties = input('Enter party. Hit enter again to end ')
- if candidates_parties == '':
- break
- parties.append(candidates_parties)
- canidate_parties = dict(zip(parties, candidates))
- party_votes = dict(zip(parties, votes))
- print(canidate_parties)
- print(party_votes)
- print(district)
- #d1= canidate_parties, party_votes
- index_district()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement