Question: 1) Given a variable , election_results, that is associated with a dictionary that maps candidate names to votes received, associate the name of the candidate
1) Given a variable , election_results, that is associated with a dictionary that maps candidate names to votes received, associate the name of the candidate with the most votes with the variable winner.
2) Store four file objects corresponding to the files winter2003.txt , spring2003.txt, summer2003.txt, and fall2003.txt in the variables winter, spring, summer, and fall (respectively), and open them all for reading.
3) Write a statement to open the file yearsummary.txt in a way that erases any existing data in the file.
4) Given four files named asiasales2009.txt, europesales2009.txt, africasales2009.txt, and latinamericasales2009.txt, define four file objects namedasia, europe, africa, and latin, and use them, respectively, to open the four files for writing.
Python 3.5 (only simple coding and answers will do)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
