1.

WAP to calculate maximum and minimum element of a given list of numbers​

Answer»

d Answer:-Question:Write a PROGRAM to calculate maximum and minimum element of a given list of numbers. Solution: Here is the program. This is WRITTEN in Python. n=INT(input("How many elements???  "))l=[]print("Enter them...")for i in range(n): l.append(int(input("Enter:  ")))print("Largest Element:  ",max(l))print("SMALLEST Element:  ",min(l))Explanation:The max() and min() function of Python is used to find out the maximum and minimum of a given list of numbers. Using this FUNCTIONS, the question is solved.Refer to the attachment for output ☑.



Discussion

No Comment Found