Chapter 6: Use a list to store the players soeU:Tholosri Update the program so 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. Console • • MENU OPTIONS 1 Display lineup 2- Add player 3 4- Move player ● - - Remove player 5 6 7- Exit program - 1 2 3 4 Edit player position Edit player stats POSITIONS C, 1B, 2B, 3B, SS, LF, CF, RF, P Menu option: 2 Name: Mike Position: OF Invalid position. Try again. POSITIONS C, 1B, 2B, 3B, SS, LF, CF, RF, P Position: CF At bats: 4 Hits: 1 Mike was added. Menu option: 1 Player Baseball Team Manager Joe Tom Ben Mike Hits: 3 Mike was updated. Menu option: 6 Lineup number: 4 You selected Mike AB=0 H=0 At bats: 10 Menu option: 4 Current lineup number: 4 Mike was selected. New lineup number: 1 Mike was moved. Menu option: 7 Bye! POS P SS 3B C AB 10 11 9 4 H AVG 0.2 0.364 0.333 0.25 2 4 3 1 Linen Ban gittis 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 entry for position is valid, and entries for hits and at bats make sense. elcano a 7

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Chapter 6: Use a list to store the players oils oebhotos/2
Update the program so 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 programi
should calculate the player's batting average from at bats and hits.
Console
MENU OPTIONS
567
1
2- Add player
3 Remove player
4- Move player
5 - Edit player position
7
- -
1
Display lineup
-
1234
Edit player stats
Exit program
POSITIONS
C, 1B, 2B, 3B, SS, LF, CF, RF, P
Menu option: 2
Name: Mike
Position: OF
Invalid position. Try again.
POSITIONS
C, 1B, 2B, 3B, SS, LF, CF, RF, P
Position: CF
At bats: 4
Hits: 1
Mike was added.
Menu option: 1
Player
Baseball Team Manager
Joe
Tom
Ben
Mike
Hits: 3
Mike was updated.
Menu option: 6
Lineup number: 4
You selected Mike AB=( H=0
At bats: 10
Menu option: 4
Current lineup number: 4
Mike was selected.
New lineup number: 1
Mike was moved.
Menu option: 7
Bye!
POS
P
SS
3B
C
AB
10
11
9
4
H
2
4
3
AVG
0.2
0.364
0.333
9108000
10.25
blireditahiling7
lish Bas guptiwhot anoitaine drevore
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 entry for position is valid, and entries for hits and at bats
make sense.
7
Transcribed Image Text:Chapter 6: Use a list to store the players oils oebhotos/2 Update the program so 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 programi should calculate the player's batting average from at bats and hits. Console MENU OPTIONS 567 1 2- Add player 3 Remove player 4- Move player 5 - Edit player position 7 - - 1 Display lineup - 1234 Edit player stats Exit program POSITIONS C, 1B, 2B, 3B, SS, LF, CF, RF, P Menu option: 2 Name: Mike Position: OF Invalid position. Try again. POSITIONS C, 1B, 2B, 3B, SS, LF, CF, RF, P Position: CF At bats: 4 Hits: 1 Mike was added. Menu option: 1 Player Baseball Team Manager Joe Tom Ben Mike Hits: 3 Mike was updated. Menu option: 6 Lineup number: 4 You selected Mike AB=( H=0 At bats: 10 Menu option: 4 Current lineup number: 4 Mike was selected. New lineup number: 1 Mike was moved. Menu option: 7 Bye! POS P SS 3B C AB 10 11 9 4 H 2 4 3 AVG 0.2 0.364 0.333 9108000 10.25 blireditahiling7 lish Bas guptiwhot anoitaine drevore 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 entry for position is valid, and entries for hits and at bats make sense. 7
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 6 images

Blurred answer
Knowledge Booster
List
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education