Q:

Write a Python program to get the smallest number from a list

0

Write a Python program to get the smallest number from a list. 

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

def smallest_num_in_list( list ):
    min = list[ 0 ]
    for a in list:
        if a < min:
            min = a
    return min
print(smallest_num_in_list([1, 2, -8, 0]))

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now