Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

M 5 Pro Instruction Introduction: Assignments requires good understanding of processing files, reading txt / string , using functions and exception handling Instructions: In this

M5Pro Instruction
Introduction:
Assignments requires good understanding of processing files, reading txt/string, using functions and exception handling Instructions:
In this assignment, you will be analyzing file content and then writing findings into another file.
What will the program do?
Allow the user to search for a team in a list of World Series Winners, the list are for winners from 1990 to 2022, and find number of times it won .
Allow the user to get a txt file with all the winners along with the number of times they won.
Allow the user get the wining team for a specific year
You will notice that the txt file contains two columns (year and name). the team names are in lower case letters (this is impo to remember), File content IS NOT to be changed. Next...
2. first add a comment block at the beginning of the file, see comment block below. Make sure you add a brief
escription, date and your name to the comment block
# A brief description of the project
# Date
# CSC121 m5Pro
# Your Name
How the program should work?
2. This too is a menu driven program, so the program is to display a list of choices similar to what is shown below.
-MENU-
Display File Content
Search by Team(list number of times team work)
Search by Year
Create a file listening Teams and number of time each tem won
f 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 trt 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
Times Won
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"
Submit your finished code solution file(s) through the (M5Pro) assignment link posted below. Make sure you submit a zipped folder containing the following:
The txt file the program is reading
the winners.csv file, the winners.txt file
The code(should be two files if program is modularized).
image text in transcribed

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

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions

Question

Why do mergers and acquisitions have such an impact on employees?

Answered: 1 week ago

Question

2. Describe the functions of communication

Answered: 1 week ago