# Find maximum in a list of numbers
print("\n\nFind maximum in a list of numbers")
no_of_terms = int(input("Enter number of terms : "))
list1 = []
for counter in range(0,no_of_terms,1):
num = int(input("Enter number : "))
list1.append(num)
print("Given list of numbers :", list1)
print("Maximum value in the list of numbers is", max(list1))
print("\n\nFind maximum in a list of numbers")
no_of_terms = int(input("Enter number of terms : "))
list1 = []
for counter in range(0,no_of_terms,1):
num = int(input("Enter number : "))
list1.append(num)
print("Given list of numbers :", list1)
print("Maximum value in the list of numbers is", max(list1))
No comments:
Post a Comment
Don't be a silent reader...
Leave your comments...
Anu