[solved]-World Series Winners Write Program Reads Worldseriestxt File Creates Dictionary Keys Names Q39075184
World Series Winners Write a program that reads theWorldSeries.txt file and creates a dictionary in which the keys arethe names of the teams and each key’s associated value is thenumber of times the team has won the World Series. The programshould also create a dictionary in which the keys are the years andeach key’s associated value is the name of the team that won thatyear. The program should prompt the user for a year in the range1903-2009. It should then display the name of the team that won theWorld Series that year and the number of times that team has wonthe World Series. It should contain the following functions: Aload_dictionaries function that has the following header: defload_dictionaries(filename): That reads the file specified infilename and creates the two dictionaries, teams and years. Aget_year function that has the following header: def get_year():that asks the user to input a year and validates the year enteredas 0 or between 1903-2009. When the year is valid, it returns theyear. A main function that controls the overall flow of the programand has the following header: def main(): Example execution

Download World Series Text:
Boston Americans
World Series Not Played in 1904
New York Giants
Chicago White Sox
Chicago Cubs
Chicago Cubs
Pittsburgh Pirates
Philadelphia Athletics
Philadelphia Athletics
Boston Red Sox
Philadelphia Athletics
Boston Braves
Boston Red Sox
Boston Red Sox
Chicago White Sox
Boston Red Sox
Cincinnati Reds
Cleveland Indians
New York Giants
New York Giants
New York Yankees
Washington Senators
Pittsburgh Pirates
St. Louis Cardinals
New York Yankees
New York Yankees
Philadelphia Athletics
Philadelphia Athletics
St. Louis Cardinals
New York Yankees
New York Giants
St. Louis Cardinals
Detroit Tigers
New York Yankees
New York Yankees
New York Yankees
New York Yankees
Cincinnati Reds
New York Yankees
St. Louis Cardinals
New York Yankees
St. Louis Cardinals
Detroit Tigers
St. Louis Cardinals
New York Yankees
Cleveland Indians
New York Yankees
New York Yankees
New York Yankees
New York Yankees
New York Yankees
New York Giants
Brooklyn Dodgers
New York Yankees
Milwaukee Braves
New York Yankees
Los Angeles Dodgers
Pittsburgh Pirates
New York Yankees
New York Yankees
Los Angeles Dodgers
St. Louis Cardinals
Los Angeles Dodgers
Baltimore Orioles
St. Louis Cardinals
Detroit Tigers
New York Mets
Baltimore Orioles
Pittsburgh Pirates
Oakland Athletics
Oakland Athletics
Oakland Athletics
Cincinnati Reds
Cincinnati Reds
New York Yankees
New York Yankees
Pittsburgh Pirates
Philadelphia Phillies
Los Angeles Dodgers
St. Louis Cardinals
Baltimore Orioles
Detroit Tigers
Kansas City Royals
New York Mets
Minnesota Twins
Los Angeles Dodgers
Oakland Athletics
Cincinnati Reds
Minnesota Twins
Toronto Blue Jays
World Series Not Played in 1994
Toronto Blue Jays
Atlanta Braves
New York Yankees
Florida Marlins
New York Yankees
New York Yankees
New York Yankees
Arizona Diamondbacks
Anaheim Angels
Florida Marlins
Boston Red Sox
Chicago White Sox
St. Louis Cardinals
Boston Red Sox
Philadelphia Phillies
New York Yankees
Python 3.6.4 Shell X File Edit Shell Debug Options Window Help Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit (Intel)] on win32 or “license ( for more information Type “copyright”, “credits” RESTART P:Cmpsc131PunchEnbodyProgramming Assignment SolutionsPA14WorldSerie SWinners.py This program displays the winner of the World Series 1903-2009 Enter the year you would like to see Pittsburgh Pirates won the World Series in 1960 and won it 5 times altogether Enter the year you would like to see which team won or 0 to quit? 2000 New York Yankees won the World Series in 2000 and won it 27 times altogether. Enter the year you would like to see which team won or 0 to quit? 1920 Cleveland Indians won the World Series in 1920 and won it 2 times altogether Enter the year you would like to see which team won or 0 to quit? 2050 The year you entered is not valid. Enter the year you would like to see which team won New York Yankees won the World Series in 2009 and won it 27 times altogether Enter the year you would like to see which team won or 0 to quit? 0 Thank you for playing. which team won or 0 to quit? 1960 or 0 to quit? 2009 >>> – Show transcribed image text Python 3.6.4 Shell X File Edit Shell Debug Options Window Help Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit (Intel)] on win32 or “license ( for more information Type “copyright”, “credits” RESTART P:Cmpsc131PunchEnbodyProgramming Assignment SolutionsPA14WorldSerie SWinners.py This program displays the winner of the World Series 1903-2009 Enter the year you would like to see Pittsburgh Pirates won the World Series in 1960 and won it 5 times altogether Enter the year you would like to see which team won or 0 to quit? 2000 New York Yankees won the World Series in 2000 and won it 27 times altogether. Enter the year you would like to see which team won or 0 to quit? 1920 Cleveland Indians won the World Series in 1920 and won it 2 times altogether Enter the year you would like to see which team won or 0 to quit? 2050 The year you entered is not valid. Enter the year you would like to see which team won New York Yankees won the World Series in 2009 and won it 27 times altogether Enter the year you would like to see which team won or 0 to quit? 0 Thank you for playing. which team won or 0 to quit? 1960 or 0 to quit? 2009 >>> –
Expert Answer
Answer to World Series Winners Write a program that reads the WorldSeries.txt file and creates a dictionary in which the keys are … . . .
OR

