Home > other >  Dear bosses, I can help
Dear bosses, I can help

Time:09-20

In a game, a total of five judges to score, to calculate the players score, remove the highest and lowest points, then the average, the value is the player's score,

(hint: first define an empty list, and then through the for loop, element is added to the list to score in turn until the end of the five judges score all input loop, and then removed from the list with the maximum and minimum values, and finally by the sum () function sum and divided by the average number of elements,)


Requirements: (1) the use of combination type of operating functions and data processing method to complete the programming;

(2) the program needs to add annotations, indicating the functions of each line of code: Complete code of the program and its result upload screenshots,

CodePudding user response:

 
Score=[]
For I in range (5) :
Sc=int (input (" % s judges scoring: "% (I + 1)))
Score. Append (sc)
Score. Remove (Max (score))
Score. Remove (min (score))
Mean=sum (score)/len (score)
Print (" player final score: % s "% scheme)

CodePudding user response:

Feel already tell the answer of the

 
# define an empty list
Score=[]

# for loop in turn to the Lord through the list add elements in the score
For I in range (1, 6) :
Sc=int (input (' {} the judges scoring: '. The format (I))
Score. Append (sc)

# remove a high score
Score. Remove (Max (score))
# remove a minimum points
Score. Remove (min (score))

# by the sum () function sum and get score
element divided by the number ofMena=sum (score)/len (score)

CodePudding user response:

refer to the second floor. So ne response:
feeling already tell the answer of the

 
# define an empty list
Score=[]

# for loop in turn to the Lord through the list add elements in the score
For I in range (1, 6) :
Sc=int (input (' {} the judges scoring: '. The format (I))
Score. Append (sc)

# remove a high score
Score. Remove (Max (score))
# remove a minimum points
Score. Remove (min (score))

# by the sum () function sum and get score
element divided by the number ofMena=sum (score)/len (score)


Thank you, thank you!

CodePudding user response:

refer to the second floor. So ne response:
feeling already tell the answer of the

 
# define an empty list
Score=[]

# for loop in turn to the Lord through the list add elements in the score
For I in range (1, 6) :
Sc=int (input (' {} the judges scoring: '. The format (I))
Score. Append (sc)

# remove a high score
Score. Remove (Max (score))
# remove a minimum points
Score. Remove (min (score))

# by the sum () function sum and get score
element divided by the number ofMena=sum (score)/len (score)


Thank you very much ╰ '(* ︶ ` *) ╯

CodePudding user response:

The
reference 1/f, archaeologists lx response:
 
Score=[]
For I in range (5) :
Sc=int (input (" % s judges scoring: "% (I + 1)))
Score. Append (sc)
Score. Remove (Max (score))
Score. Remove (min (score))
Mean=sum (score)/len (score)
Print (" player final score: % s "% scheme)

Thank you so much, thank you (* °?=3 °)
  • Related