Question: if user enters 1 , the program is to display content of txt file if user enters 2 , the program

if user enters "1", the program is to display content of txt file
if user enters "2", the program is to ask the user to enter name of team (in lowercase letters). Next the program is to do the following
if the team name exists in the file, the program is to display the year(s) the team won.
if the team name was not found in the file, the user is to be notified and the menu is to be displayed again
if user enters "3", the program is to ask the user to enter the year. The program is to then do the following:
if an incorrect year is entered, the program is to notify the user and ask them to re-enter year ( valid year 1990-2022)
if the user enters a valid year, the program is to display the name of the team that won that year.
if user enters "4", the program is to create two files (a csv file and a txt file)
the txt file is to list team names (each team only ONCE) and in the next column, it's to display the name of times each team won.
Information should be written in a tabular format and the txt file MUST have a title. See example below
Name the txt file "Winners.txt"
1990
2022 World Series Winners
Team Name
Times Won
cincinnati reds
the csv file is to have two columns (Team Name, Won).
Team names are to be listed under the "Team Name" column, each team once only
The number of times each team won should be listed under the "Won" column.
Name the csv file "winners.csv"
if user enters "5", the program notifies the user that the program will stop and then terminates.
if user enters something other than numbers 1 through 5, the program is to notify the user that their entry was invalid and then displays the menu again
The program is to only terminate/stop if the user enters "5"
WorldSeriesWinners.txt
Year Name
1990 cincinnati reds
1991 minnesota twins
1992 toronto blue jays
1993 toronto blue jays
1995 atlanta braves
1996 new york yankees
1997 florida marlins
1998 new york yankees
1999 new york yankees
2000 new york yankees
2001 arizona diamondbacks
2002 anaheim angels
2003 florida marlins
2004 boston red sox
2005 chicago white sox
2006 st. louis cardinals
2007 boston red sox
2008 philadelphia phillies
2009 new york yankees
2010 san francisco giants
2011 st. louis cardinals
2012 san francisco giants
2013 boston red sox
2014 san francisco giants
2015 kansas city royals
2016 chicago cubs
2017 houston astros
2018 boston red sox
2019 washington nationals
2020 los angeles dodgers
2021 atlanta braves
2022 houston astros
 if user enters "1", the program is to display content of

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!