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, 3, 2, 7, 5])==2
  assert smallestNumber([1, 1, 1, 1, 1])==1
  assert smallestNumber([-5, 0, 3, -8, 10])==-8
  assert smallestNumber([5])==5
output: def smallestNumber(nums):
      smallest = nums[0]
      for i in range(1, len(nums)):
          if nums[i] < smallest:
              smallest = nums[i]
      return smallest