subject

This assignment focuses on the design, implementation, and testing of python programs to process data files using lists and tuples, as described below.
assignment specifications:

1. you will develop a python program to manage information about baseball players. the program will maintain the following information for each player in the data set:

player’s name (string)
team identifier (string)
games played (integer)
at bats (integer)
runs scored (integer)
hits (integer)
doubles (integer)
triples (integer)
homeruns (integer)
2. the program will recognize the following commands:

quit

input filename
team identifier
report n players

the program will be operated interactively: it will prompt the user and accept commands from the keyboard.
if the user enters an invalid command, the program will display an appropriate message and prompt the user to enter another command.
3. the "quit" command will halt execution.
4. the "" command will display information to the user about the commands recognized by the program.
5. the "input" command will be followed by a string representing the name of an input file. the program will discard the current data set stored in memory, and then process the input file as the source for a new data set (open the file, read the file once and store the records, then close the file).
an input file contains zero or more player records, where each record consists of the nine fields listed above. the records are separated by newlines, and the fields are separated by semicolons.
if the user enters an invalid file name, the program will display an appropriate message and prompt the user to enter another file name. the program will halt after the user enters an invalid file name three consecutive times.
6. the "team" command will be followed by a string representing a team identifier. the program will display all information about all players on that team.
if the user enters an invalid team identifier, the program will display an appropriate message and prompt the user to enter another command; the program will not display an empty table.
7. the "report" command will be followed by an integer number and a string (one of "hits", "batting" or "slugging").
if the user enters an invalid command, the program will display an appropriate message and prompt the user to enter another command; the program will not display an empty report.
for each report, the program will display all information about the top "n" players in a given category:

hits -- number of hits
batting -- batting average
slugging -- slugging percentage

8. the program will display appropriate messages to inform the user about any unusual circumstances.

de aza, alejandro; cws; 153; 607; 84; 160; 27; 4; 17
hunter, torii; det; 144; 606; 90; 184; 37; 5; 17
hamilton, josh; laa; 151; 576; 73; 144; 32; 5; 21
choo, shin-soo; cin; 154; 569; 107; 162; 34; 2; 21
upton, justin; atl; 149; 558; 94; 147; 27; 2; 27
cabrera, miguel; det; 148; 555; 103; 193; 26; 1; 44
posey, buster; sf; 148; 520; 61; 153; 34; 1; 15
suzuki, ichiro; nyy; 150; 520; 57; 136; 15; 3; 7
holliday, matt; stl; 141; 520; 103; 156; 31; 1; 22
headley, chase; sd; 141; 520; 59; 130; 35; 2; 13

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 05:00
Modern businesses use different technologies to accomplish work tasks
Answers: 2
question
Computers and Technology, 23.06.2019 09:30
You have been supporting csm tech publishing's windows server 2016 server network for over a year. the office has two windows server 2016 servers running active directory and a number of other roles. management has informed you that a small sales office is opening in the same building three floors up. the sales manager wants to install a sales application on a server located in the sales office. this server will have limited physical security because there's no special room dedicated for it, which means it will be accessible to non-it personnel and visitors. you're considering installing windows server 2016 server core on the new server because accessing its console regularly probably won't be necessary, and this server will be managed from one of the other csm tech publishing servers. what are the benefits and drawbacks of using server core for this branch office? what are some things you should do to set up this server management environment?
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
Sports and entertainment class, your goal is to increase attendance and make a profit for a game by getting your team on a winning track with total salaries less than $3,000,000
Answers: 3
question
Computers and Technology, 24.06.2019 00:50
Which player type acts on other players? a. killer b. achiever c. explorer d. socializer
Answers: 1
You know the right answer?
This assignment focuses on the design, implementation, and testing of python programs to process dat...
Questions
question
Mathematics, 14.12.2021 04:00
question
Mathematics, 14.12.2021 04:10
Questions on the website: 13722367