Question: Python3 please!! http://cs.gmu.edu/~marks/112/projects/votes.csv http://cs.gmu.edu/~marks/112/projects/abbreviations.csv Candidate: we will use the following representation for a candidate inside our program: a tuple containing these values in this order.

Python3 please!!

http://cs.gmu.edu/~marks/112/projects/votes.csv

http://cs.gmu.edu/~marks/112/projects/abbreviations.csv

Python3 please!! http://cs.gmu.edu/~marks/112/projects/votes.csv http://cs.gmu.edu/~marks/112/projects/abbreviations.csv Candidate: we will use the following representation for

a candidate inside our program: a tuple containing these values in thisorder. Note that name and party are string abbreviations, and popular_votes and

Candidate: we will use the following representation for a candidate inside our program: a tuple containing these values in this order. Note that name and party are string abbreviations, and popular_votes and electoral votes are integers. candidate (name, party, popular_votes, electoral_votes) Database1: a "database" of votes can store all candidates' votes for each State. Obviously, a candidate's name may get reused in different States, but never in the same State. Not all candidate names appear in every State. Our database must be a dictionary whose keys are States, and whose values are lists of candidate values. Only candidates with positive number of popular_votes may be present in a State. Empty lists are not allowed as values. Candidates in the same State must be stored alphabetically by their abbreviated name (hint: use insert instead of append when adding items to the list because you can't use sorting functions). votes db- AL: [(Johnson', 'IND', 44467, 0), ('Stein', 'IND', 9391, 0)], 'AK': [('Trump', 'REP', 163387, 9)], VA': [(Clinton', 'DEM', 1981473, 13)] Database2: a "database" of abbreviations will store all abbreviations as a dictionary whose keys are the abbreviated strings and whose values are the equivalent full strings, like in the following sample: abbr db AL': 'Alabama AK 'Alaska', DEM': 'Democratic' REP': 'Republican' Trump: 'Donald Trump Candidate: we will use the following representation for a candidate inside our program: a tuple containing these values in this order. Note that name and party are string abbreviations, and popular_votes and electoral votes are integers. candidate (name, party, popular_votes, electoral_votes) Database1: a "database" of votes can store all candidates' votes for each State. Obviously, a candidate's name may get reused in different States, but never in the same State. Not all candidate names appear in every State. Our database must be a dictionary whose keys are States, and whose values are lists of candidate values. Only candidates with positive number of popular_votes may be present in a State. Empty lists are not allowed as values. Candidates in the same State must be stored alphabetically by their abbreviated name (hint: use insert instead of append when adding items to the list because you can't use sorting functions). votes db- AL: [(Johnson', 'IND', 44467, 0), ('Stein', 'IND', 9391, 0)], 'AK': [('Trump', 'REP', 163387, 9)], VA': [(Clinton', 'DEM', 1981473, 13)] Database2: a "database" of abbreviations will store all abbreviations as a dictionary whose keys are the abbreviated strings and whose values are the equivalent full strings, like in the following sample: abbr db AL': 'Alabama AK 'Alaska', DEM': 'Democratic' REP': 'Republican' Trump: 'Donald Trump

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!