The file, Program11.txt, on the I: drive contains a chronological list of the World Series’ winning teams from 1903 through 2018. 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 2018. (Note that the World Series was not played in 1904 or 1994. There are no entries in the file indicating this.) Write a program that reads this file and creates a dictionary in which the keys 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 program should also create a dictionary in which the keys are the years and each key’s associated value is the name of the team that won that year. The program should prompt the user for a year in the range of 1903 through 2018. 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. Allow the user to run the program as many times as possible until a sentinel value of zero (0) has been entered for the year. No input, processing, or output should happen in the main function. All work should be delegated to other functions. The program should have at least 4 functions (main and developerInfo included). Include the recommended minimum documentation for each function. See the program one template for more details.
The file, Program11.txt, on the I: drive contains a chronological list of the World Series’ winning teams from 1903 through 2018. 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 2018. (Note that the World Series was not played in 1904 or 1994. There are no entries in the file indicating this.) Write a program that reads this file and creates a dictionary in which the keys 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 program should also create a dictionary in which the keys are the years and each key’s associated value is the name of the team that won that year. The program should prompt the user for a year in the range of 1903 through 2018. 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.
Allow the user to run the program as many times as possible until a sentinel value of zero (0) has been entered for the year. No input, processing, or output should happen in the main function. All work should be delegated to other functions. The program should have at least 4 functions (main and developerInfo included). Include the recommended
minimum documentation for each function. See the program one template for more details.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images