In this program assignment, you will find a text file named WorldSeries.txt. This file contains a chronological list of the World Series' winning teams from 1903 through 2020. The first line in the file is the name of the team that won in 1903, and the last line is the name of the team that won in 2020. (Note the World Series was not played in 1904 and 1994. There are entries in the file indicating this.)

Write a program that reads this file and creates TWO dictionaries. The keys of the first dictionary are the names of the teams, and each key's associated value is the number of times the team has won the World Series. The keys of the second dictionary are the years, and each key's associated value is the name of the team that won that year.

Next display the top five teams that won the most of the times in a descending order. A sample looking could be as:

Top Five of World Series Champions:
Team Name Winning Times
New York Yankees 27
St. Louis Cardinals 11
Boston Red Sox 8
New York Giants 5
Pittsburgh Pirates 5

The program should then prompt the user to enter a year in the range of 1903 through 2020. It should then display the name of the team that won the World Series that year, and the number of times that team has won the World Series. The program should allow a user to play multiple times. Remind user how to terminate/stop the program.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.