Answered step by step
Verified Expert Solution
Question
1 Approved Answer
#### I NEED HELP CODING THESE PROGRAMS USING PYTHON ASAP THERE ARE SPECIFICATIONS THAT ARE REQUIRED. PLEASE! Use a list to store the players Update
#### I NEED HELP CODING THESE PROGRAMS USING PYTHON ASAP THERE ARE SPECIFICATIONS THAT ARE REQUIRED. PLEASE!
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. Baseball Team Manager MENU OPTIONS 1Display 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: C At bats: 0 Hits: 0 Mike vas added Menu option: 1 Player POS AB AVG 1 Joe 2 Tom 3 Bern 4Mike 10 0.2 0.364 0.0 0.0 3B 0 Menu option:6 Lineup number: 4 You selected Mike AB-0 H-O At bats: 4 Hits: 1 Mike vas updated Menu option: 4 Current lineup number: 4 Mike vas selected New 1ineup number: 1 Mike vas moved Menu option: 7 Bye! 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 Create a program that checks whether a number is a prime number and displays the total number of factors if it is not a prime number Console Prime Number Checker Please enter an integer between 1 and 5000: 1 Invalid integer. Please try again. Please enter an integer between 1 and 5000: 2 2 is a prime number Try again? (y): y Please enter an integer between 1 and 5000: 3 3 is a prime number Try again? (y): y Please enter an integer between 1 and 5000: 4 4 is NOT a prime number It has 3 factors Try again? (y): y Please enter an integer between 1 and 5000: 6 6 is NOT a prime number It has 4 factors Try again? (y): n Bye! Specifications A prime number is only divisible by two factors (1 and itself). For example, 7 is a prime number because it is only divisible by 1 and 7 If the number is not a prime number, the program should display its number of factors. For example, 6 has four factors (1, 2, 3, and 6) Store the code that gets a valid integer for this program in its own function Store the code that calculates the number of factors for a number in its own function. Store the rest of the code that gets input and displays output in the main functionStep 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