Generation

generate functionFri, 26 May 2023

Generate a function to find the smallest number in a list.

def smallest_number(num_list): min_num = num_list[0] for num in num_list: if num < min_num: min_num = num return min_num smallest_number([4, 8, 1, 10])

Want to kickstart your project?Use the new AI Studio to create your code