Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE HELP ME WITH THESE PYTHON PROGRAMS. ALSO PLEASE MAKE SURE ALL SPECIFICATIONS ARE WITHIN THE CODING AS LISTED ON THE PROGRAM THANK YOU Complete
PLEASE HELP ME WITH THESE PYTHON PROGRAMS. ALSO PLEASE MAKE SURE ALL SPECIFICATIONS ARE WITHIN THE CODING AS LISTED ON THE PROGRAM THANK YOU
Complete Exercise 6-1 and Exercise 6-2 (pg: 193, 194). Save your work after completing the exercises using the filenames Exercise 6_1 output.py, Exercise_6_2 output.py Files to upload: Exercise 6_1 output.py, Exerdise 6_2 output.py 6B. Case Study Use a list to store the players Update the program so that it allows you to store the players for the starting lineup. This should include the player's name, position, at bats, and hits. In addition, the program should calculate the player's batting average from at bats and hits. Basebal1 Tean Nanager MENU OPTIONS 1 Display lineup 2Add player 3 Remove player Move player 5 Edit player position 6- Edit player stats -Exit progran C, 1B, 2B, 3B, SS, LF, CP, RF, P Menu option: 2 Poaition: C At bats: 0 Hits: Mike was added. Menu option: 1 Player POS A AVG 1 Joe 2 Ton 3 Ben 4 Mite 5S 3B 10 11 0.2 0.364 0.0 Menu option: You selected Mike AB-0 H-0 At bat3: 4 Hits: 1 Mite was updated. Menu option: 4 Current 11neup nimber: 4 Mike was selected New lineup nunber: 1 Mike was noved. Menu option: 7 Bre! Specifications . Use a list of lists to store each player in the lineup. . Use a tuple to store all valid positions (C, 1B, 2B, etc]. Make sure that the user's position entries are valid. File to upload: baseball-team-py Chapter 7: How to work with file I/O Objectives 1. Use text, CSV, or binary files to save and retrieve the data that's used by your programs. 7A. Case Study 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 Tean Manager MENU OPTIUNS 1 Display lineup 2Add player 3-Remove player 4Move player 5 - Edit player position 6 Edit player stats 7 Exit progran POSITIONS C, 1B, 2B, 3B, SS, LF, CE, RF, P Menu option: 1 Player POS AB AVG 1 Denard 2 Joe 3 Buster 4 Hunter 5 Brandon 6 Eduardo 7 Brandon 8 Jarrett 9 Madison OF 2B 545 174 0.319 475 138 0.291 535 176 0.329 4B5 174 0.359 532 125 0.235 477 533 127 0.238 215 5B 103 21 OF 3B 1B OF 122 0.256 0.27 0.204 Menu option: 7 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 Files to upload: baseball_team.py, db.py, players.csv Complete Exercise 6-1 and Exercise 6-2 (pg: 193, 194). Save your work after completing the exercises using the filenames Exercise 6_1 output.py, Exercise_6_2 output.py Files to upload: Exercise 6_1 output.py, Exerdise 6_2 output.py 6B. Case Study Use a list to store the players Update the program so that it allows you to store the players for the starting lineup. This should include the player's name, position, at bats, and hits. In addition, the program should calculate the player's batting average from at bats and hits. Basebal1 Tean Nanager MENU OPTIONS 1 Display lineup 2Add player 3 Remove player Move player 5 Edit player position 6- Edit player stats -Exit progran C, 1B, 2B, 3B, SS, LF, CP, RF, P Menu option: 2 Poaition: C At bats: 0 Hits: Mike was added. Menu option: 1 Player POS A AVG 1 Joe 2 Ton 3 Ben 4 Mite 5S 3B 10 11 0.2 0.364 0.0 Menu option: You selected Mike AB-0 H-0 At bat3: 4 Hits: 1 Mite was updated. Menu option: 4 Current 11neup nimber: 4 Mike was selected New lineup nunber: 1 Mike was noved. Menu option: 7 Bre! Specifications . Use a list of lists to store each player in the lineup. . Use a tuple to store all valid positions (C, 1B, 2B, etc]. Make sure that the user's position entries are valid. File to upload: baseball-team-py Chapter 7: How to work with file I/O Objectives 1. Use text, CSV, or binary files to save and retrieve the data that's used by your programs. 7A. Case Study 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 Tean Manager MENU OPTIUNS 1 Display lineup 2Add player 3-Remove player 4Move player 5 - Edit player position 6 Edit player stats 7 Exit progran POSITIONS C, 1B, 2B, 3B, SS, LF, CE, RF, P Menu option: 1 Player POS AB AVG 1 Denard 2 Joe 3 Buster 4 Hunter 5 Brandon 6 Eduardo 7 Brandon 8 Jarrett 9 Madison OF 2B 545 174 0.319 475 138 0.291 535 176 0.329 4B5 174 0.359 532 125 0.235 477 533 127 0.238 215 5B 103 21 OF 3B 1B OF 122 0.256 0.27 0.204 Menu option: 7 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 Files to upload: baseball_team.py, db.py, players.csvStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started