input: Write a function to find the smallest number in a given list.
  def smallestNumber(nums):
      smallest = nums[0]
      for i in range(1, len(nums)):
          if nums[i] < smallest:
              smallest = nums[i]
      return smallest
  
  assert smallestNumber([4, 5, 6, 7, 8])==4
  assert smallestNumber([9, 2, 6, 1, -3])==-3
  assert smallestNumber([10])==10
  assert smallestNumber([5, 4, 3, 2, 1])==1
  assert smallestNumber([])==None
output: def smallestNumber(nums):
      if not nums:
          return None
      smallest = nums[0]
      for num in nums:
          if num < smallest:
              smallest = num
      return smallest