Computer Science, asked by Jaillesh, 1 year ago

write a python program to find minimum and maximum number in the given list and there by find the average of these two numbers

Answers

Answered by graxx
7
lst = []
num = int(input('How many numbers: '))for n in range(num):
numbers = int(input('Enter number '))
lst.append(numbers)print("Maximum element in the list is :", max(lst), "\nMinimum element in the list is :", min(lst))

n=int(input("Enter the number of elements to be inserted: ")) a=[] for i in range(0,n): elem=int(input("Enter element: ")) a.append(elem) avg=sum(a)/n print("Average of elements in the list",round(avg,2))
Attachments:

graxx: brother download phython runner from play store
Jaillesh: very much thanks graxx genius
graxx: for output
Jaillesh: OK bro
Jaillesh: very much Tnx
graxx: most welcome
Jaillesh: Tmrw... is the last date for lab manual submition... so only I.. asking this question
graxx: ohhh
Jaillesh: once again Tq very much
graxx: most welcome
Answered by vinay2461
0

Answer:

lst = []

num = int(input('How many numbers: '))for n in range(num):

numbers = int(input('Enter number '))

lst.append(numbers)print("Maximum element in the list is :", max(lst), "\nMinimum element in the list is :", min(lst))

n=int(input("Enter the number of elements to be inserted: ")) a=[] for i in range(0,n): elem=int(input("Enter element: ")) a.append(elem) avg=sum(a)/n print("Average of elements in the list",round(avg,2))

Explanation:

Attachments:
Similar questions