Question: Sample Console Output When the program starts the user has the option to enter a game
Question:
Question:
Sample Console Output
When the program starts the user has the option to enter a game date. The current date is printed by the program with the YYYY-MM-DD format. This format is used for all date input and output.
================================================================
Baseball Team Manager
CURRENT DATE: 2022-09-12
GAME DATE:
If no date is entered display the menu options.
================================================================
Baseball Team Manager
CURRENT DATE: 2022-09-12
GAME DATE:
MENU OPTIONS
1 - Display lineup
2 - Add player
3 - Remove player
4 - Move player
5 - Edit player position
6 - Edit player stats
7 - Exit program
POSITIONS
C, 1B, 2B, 3B, SS, LF, CF, RF, P
================================================================
Menu option:
If a date is entered display the number of days till the game and then the menu option. Do not display the number of games if the date entered is in the past.
================================================================
Baseball Team Manager
CURRENT DATE: 2022-09-12
GAME DATE: 2022-09-13
DAYS UNTIL GAME: 1
MENU OPTIONS
1 - Display lineup
2 - Add player
3 - Remove player
4 - Move player
5 - Edit player position
6 - Edit player stats
7 - Exit program
POSITIONS
C, 1B, 2B, 3B, SS, LF, CF, RF, P
============================================================
Menu option: 1
Player POS AB H AVG
------------------------------------------------------------
1 Dominick Gilbert 1B 545 174 0.319
2 Craig Mitchell CF 533 127 0.238
3 Jack Quinn RF 535 176 0.329
4 Simon Harris C 485 174 0.359
5 Darryl Moss 3B 532 125 0.235
6 Grady Guzman SS 477 122 0.256
7 Wallace Cruz LF 475 138 0.291
8 Cedric Cooper 2B 215 58 0.270
9 Alberto Gomez P 103 21 0.204
Menu option:
Notes:
The function that reads the CSV file can use the csv module and should loop through one row of the file at a time. For each row populate the dictionary for a player based on the 4 columns of data in the file and add that dictionary object to the list of players. The function will return the list of dictionary objects.
The function that writes to the CSV file should not use the csv module writerows method since this method does not work with a dictionary. Treat the CSV file as a text file when opening the CSV file. Using a loop for the players list, call the file write method to write the name, position, at bats, and hits values separated by commas. Make sure to include a new line escape sequence after the hits value.
================================================================
Baseball Team Manager
CURRENT DATE: 2022-09-12
GAME DATE:
If no date is entered display the menu options.
================================================================
Baseball Team Manager
CURRENT DATE: 2022-09-12
GAME DATE:
MENU OPTIONS
1 - Display lineup
2 - Add player
3 - Remove player
4 - Move player
5 - Edit player position
6 - Edit player stats
7 - Exit program
POSITIONS
C, 1B, 2B, 3B, SS, LF, CF, RF, P
================================================================
Menu option:
If a date is entered display the number of days till the game and then the menu option. Do not display the number of games if the date entered is in the past.
================================================================
Baseball Team Manager
CURRENT DATE: 2022-09-12
GAME DATE: 2022-09-13
DAYS UNTIL GAME: 1
MENU OPTIONS
1 - Display lineup
2 - Add player
3 - Remove player
4 - Move player
5 - Edit player position
6 - Edit player stats
7 - Exit program
POSITIONS
C, 1B, 2B, 3B, SS, LF, CF, RF, P
============================================================
Menu option: 1
Player POS AB H AVG
------------------------------------------------------------
1 Dominick Gilbert 1B 545 174 0.319
2 Craig Mitchell CF 533 127 0.238
3 Jack Quinn RF 535 176 0.329
4 Simon Harris C 485 174 0.359
5 Darryl Moss 3B 532 125 0.235
6 Grady Guzman SS 477 122 0.256
7 Wallace Cruz LF 475 138 0.291
8 Cedric Cooper 2B 215 58 0.270
9 Alberto Gomez P 103 21 0.204
Menu option
Submission details
Projects can require the use of material from any of the previous chapters covered in the textbook.
a Team Management Python program that satisfies the specifications above. Think of the specifications as a checklist of requirements.
Management Accounting Information for Decision-Making and Strategy Execution
ISBN: 978-0137024971
6th Edition
Authors: Anthony A. Atkinson, Robert S. Kaplan, Ella Mae Matsumura, S. Mark Young