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
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))
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
Answered by
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