Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

find the largest and smallest numbers in a list

#Exercise 3 -  Find the largest and smallest number in a list
thislist = input("How many numbers do you want to enter:")
newlist = []
for x in range (0, int(thislist)):
 owl = int(input("Please Enter your numbers:"))
 newlist.append(owl)
print ("The max number entered is:", max(newlist))
print ("The min number entered is:", min(newlist))
 
PREVIOUS NEXT
Tagged: #find #largest #smallest #numbers #list
ADD COMMENT
Topic
Name
6+8 =