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 20:00
When you mouse over and click to add a search term this(these) boolean operator(s) is(are) not implied. (select all that apply)?
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
Creating "smart interfaces" in all sectors of industry, government, and the public arena is one of the fastest growing hct areas. these interfaces model, interpret, and analyze such human characteristics as speech, gesture, and vision. the field of biometrics, in which humans authenticate themselves to machines, is an area of considerable interest to hct practitioners. fingerprint scans are one of the most frequently used biometric options, and this article, biometric student identification: practical solutions for accountability & security in schools, makes a case for the implementation of fingerprint scans in schools. critique the article, and answer the following questions: according to the author, what are the main benefits of adopting fingerprint scans in schools for student identification? according to the author, what are the main drawbacks of adopting fingerprint scans in schools for student identification? do you agree with the author's assessment of the pl
Answers: 2
question
Computers and Technology, 23.06.2019 12:00
3. when you right-click a linked spreadsheet object, what commands do you choose to activate the excel features? a. linked worksheet object > edit b. edit data > edit data c. linked spreadsheet > edit d. object > edit data
Answers: 2
question
Computers and Technology, 23.06.2019 16:00
An english teacher would like to divide 8 boys and 10 girls into groups, each with the same combination of boys and girls and nobody left out. what is the greatest number of groups that can be formed?
Answers: 2
You know the right answer?
This assignment focuses on the design, implementation, and testing of python programs to process dat...
Questions
question
Mathematics, 15.04.2021 01:00
question
Mathematics, 15.04.2021 01:00
question
Mathematics, 15.04.2021 01:00
question
Mathematics, 15.04.2021 01:00
question
Advanced Placement (AP), 15.04.2021 01:00
question
Mathematics, 15.04.2021 01:00