0 out of 464 challenges solved
Write a Python function `smallest_num(xs)` that takes a list of numbers `xs` as input and returns the smallest number in the list. #### Example Usage: ```python [main.nopy] print(smallest_num([10, 20, 1, 45, 99])) # Output: 1 print(smallest_num([1, 2, 3])) # Output: 1 print(smallest_num([45, 46, 50, 60])) # Output: 45 ``` #### Constraints: - The input list will contain at least one number. - The numbers in the list can be integers or floats.
def smallest_num(xs): """ Find the smallest number in a list. Args: xs (list): A list of numbers. Returns: number: The smallest number in the list. """ # Your code here pass