Data structure

profileabdals1

(Use idle 3.6 python ) please 

find a file 

called WorldSeries.txt.  The format of this file is:

Year,WinningTeam,League,Games,LosingTeam,League



Write a menu-driven program with the following options:

1.    List all winning teams from the AL (list team name only once if they won more than 1 time)

2.    List all winning teams from the NL (list team name only once if they won more than 1 time)

3.    For a specific team, how many times did they win

4.    For a specific team, how many times were they in the World Series (win or lose)

5.    For a specific year, who won and who lost

6.    Quit

Program Requirements:

1.    Must use at least one list and/or one dictionary.  Multiple lists and/or dictionaries can be 

used.  Whatever you use, it must be used to process the requests 1-5

2.    Each choice 1-5 must be in a function

3.    The menu must be in a function


Extra : 

Use a search engine (such as Google) to find out the names of all the teams in Major League Baseball.  

From this list (you will need to create a file of these names and read this into your program into a list), 

find all the teams that have been in a World Series but never won and all the teams that have never 

even been in a World Series.  Make this Menu Option 6 and move Quit to Option 7.

  • 8 years ago
  • 8
Answer(1)

Purchase the answer to view it

blurred-text
  • attachment
    WorldSeries.py
  • attachment
    worldSeries.txt