Computer Science, asked by ajeet7326, 9 months ago

A Sports teacher has measured the height of the students.saumya has been given the assignment to find the maximum and minimum height of the students.suggest the function, which she should use to accomplish the task.​

Answers

Answered by nibrah007
22

Answer:

The below code is written in python,

Here we are taking inputs of the heights of the students in the class and put them into a list.

Then we are calling the max and min function to find the maximum and minimum height from the data.

heightlist = []

studentno= int(input('Number of students in the class: '))

for n in range(studentno):

  heightgiven= int(input('Enter the height of each student'))

  heightlist .append(heightgiven)

print("Maximum height among all in the class is :", max(heightlist ), "\nMinimum  height among all in the class is :", min(heightlist ))

i hope it was helpful please mark me brainliest

Explanation:

Similar questions