subject

In this lab, you complete a partially prewritten python program that uses a list. the program prompts the user to interactively enter eight batting averages, which the program stores in an array. it should then find the minimum and maximum batting averages stored in the array, as well as the average of the eight batting averages. the data file provided for this lab includes the input statement and some variable declarations. comments are included in the file to you write the remainder of the program. instructionsmake sure the file battingaverage. py is selected and open. write the python statements as indicated by the comments. execute the program by clicking the "run code" button at the bottom of the screen. enter the following batting averages: .299, .157, .242, .203, .198, .333, .270, .190. the minimum batting average should be .157 and the maximum batting average should be .333. the average should be .2365.# declare a named constant for array size here. max_averages = 8# declare array here.# write a loop to get batting averages from user and assign to array. averagestring = input("enter a batting average: ") battingaverage = float(averagestring) # assign value to array.# assign the first element in the array to be the minimum and the maximum. minaverage = averages[0]maxaverage = averages[0]# start out your total with the value of the first element in the array. total = averages[0]# write a loop here to access array values starting with averages[1] # within the loop test for minimum and maximum batting averages. # also accumulate a total of all batting averages.# calculate the average of the 8 batting averages.# print the batting averages stored in the averages array.# print the maximum batting average, minimum batting average, and average batting average.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:00
Arecipients list has been loaded into a document. which commands should be clicked in order to filter the list so that letters will not be printed for recipients who live in a certain state? mailings tab, start mail merge, select recipients, type new list, then insert only contacts from the desired states mailings tab, rules, select recipients, use existing list, then choose a recipients list that includes only contacts in certain states mailings tab, select recipients, use existing list, rules, fill in, then type in certain states mailings tab, rules, skip record select “state” under field name, then type in the state name under “equal to”
Answers: 2
question
Computers and Technology, 23.06.2019 03:50
Iam a bacterium. i cause stomach cramps and diarrhea. i am caused by eating rotten foodssuch as chicken, fish, or eggs. sometimes turtles carry my bacteria.what am i?
Answers: 2
question
Computers and Technology, 23.06.2019 16:10
What is the ooh? a. omaha occupation handbook b. online occupational c. occupations online d. occupational outlook handbook select the best answer from the choices provided
Answers: 3
question
Computers and Technology, 24.06.2019 14:00
In simple terms, how would you define a protocol?
Answers: 2
You know the right answer?
In this lab, you complete a partially prewritten python program that uses a list. the program prompt...
Questions
Questions on the website: 13722367