Write a program to find smallest number in a list using for loop

ls1 = []
total_ele = int (input (" how many number"))

for i in range (total_ele):
n =int (input (“Enter a number:”))
print (ls1)
min = ls1[0]

for i in range (len (ls1)):
if ls1[i] < min:
min = ls1[i]
print ("The smallest element is ", min)


Very Well done, Keep it up…
Winner of Today’s Coding Challange.

1 Like


correct, keep it up.

1 Like