Text: PYTHON CHAPTER 07,
WEEK 05 Assignment: Use a file to save the
data
For this case study,
you'll use the programming skills that you learn in Murach's
Python Programming to develop a program that helps a
person manage a baseball team. This program stores
the data for each player on the team, and it also lets the manager
set a starting lineup for each game. After you read chapter 2, you
can develop a simple program that calculates the batting average
for a player. Then, after you complete most of the other chapters,
you can enhance and improve this program.
Here is the screenshot
of the assignment and PLEASE READ THE
SPECIFICATION:
Chapter 7 Assignment Submission
Assignment: Use a file to save the data Update the program so it reads the player data from a file when the program starts and writes the player data to a file anytime the data is changed.
Console
Baseball Team Manager
MENU OPTIONS Display lineup Add player - Remove player - Move player - Edit player position - Edit player stats 7 Exit program
POSITIONS C,1B,2B, 3B,SS,LF, CF,RF,P
Menu option: 1 Player
POS
AB
H
AVG
Denard Joe Buster Hunter Brandon Eduardo Brandon Jarrett Madison
OF 2B C OF SS 3B 1B OF SP
545 475 535 485 532 477 533 215 103
174 138 176 174 125 122 127 58 21
0.319 0.291 0.329 0.359 0.235 0.256 0.238 0.27 0.204
2
Menu option: 7 Bye!
Specifications
Use a CSV file to store the lineup. Store the functions for writing and reading the file of players in a separate module than the rest of the program.