Chapter 6: Use a list to store the players 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 Add player 2 3 Remove player 4 Move player 5 Edit player position Edit player stats Exit program 6 7 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 1 2 3 4 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 с AB 10 11 9 4 H 2 HWAN 4 3 1 Specifications Use a list of lists to store each player in the lineup. AVG 0.2 0.364 0.333 0.25 ======== • 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

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

Needs to use python and methods 

2:12
Chapter 6: Use a list to store the players
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 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: 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
2
3
4
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
с
20094
AB
10
11
H
HWAN
1
AVG
bridges.rwu.edu
0.2
0.364
0.333
0.25
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:2:12 Chapter 6: Use a list to store the players 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 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: 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 2 3 4 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 с 20094 AB 10 11 H HWAN 1 AVG bridges.rwu.edu 0.2 0.364 0.333 0.25 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 5 steps with 3 images

Blurred answer
Knowledge Booster
Graphical User Interface
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.
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