Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PYTHON HELP! WorldSeriesWinners.txt: Boston Americans New York Giants Chicago White Sox Chicago Cubs Chicago Cubs Pittsburgh Pirates Philadelphia Athletics Philadelphia Athletics Boston Red Sox Philadelphia

PYTHON HELP!

image text in transcribed

WorldSeriesWinners.txt:

Boston Americans 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 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 San Francisco Giants St. Louis Cardinals San Francisco Giants Boston Red Sox San Francisco Giants Kansas City Royals Chicago Cubs Houston Astros 
The World Series is the championship of Major League Baseball, played between the champions of the American League and the National League. It was first played in 1903 and with only a couple of exceptions (1904 & 1994) it has been played every year since The file WorldSeriesWinners.txt contains a chronological list of the teams that have won the World Series from 1903 (Boston Americans) through 2017 (Houston Astros). There are no entries for 1904 and 1994 so you will need to adjust for those two years You are to create a program that will read the text file and create two dictionaries. One dictionary will use the name of the teams as the key value with the associated value of how many times the team has won the World Series. The other dictionary will have the year as a key value, with the name of the team that won the World Series that year as the associated value Your program should prompt the user for a year in the range of 1903 through 2016 (be sure to validate it). It should then display the name of the team that won the World Series that year and the total number of times the team has won (or that the Series wasn't played that year). Create an appropriate display format for both the input and output. Examples are shown below, with user input in bold type Use the programming conventions we have talked about. This includes using the main) function convention. As always, it is important to think through and solve the problem before writing any code RESTART Enter a year in the range 1903-2016: 2000 The team that won the World Series in 2000 is the New York Yankees. They won the World Series 27 times. RESTART Enter a year in the range 1903-2016: 1994 The World Series wasn't played in the year 1994 RESTART Enter a year in the range 1903-2016: 1911 The team that won the World Series in 1911 is the Philadelphia Athletics. They won the World Series 5 times

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Principles Programming And Performance

Authors: Patrick O'Neil

1st Edition

1558603921, 978-1558603929

More Books

Students also viewed these Databases questions