Write a Python program to find the smallest number using the given array of numbers.
[13, 45, 7, 23]
def smallest_number(arr):
    min_number = arr[0]
    for num in arr[1:]:
        if num < min_number:
            min_number = num
    return min_number