input: Write a function to find the smallest number in a given list. The function should take a list of integers as input and return the smallest integer in the 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, 1, 2, 3])==1
  assert smallestNumber([1, 2, 3, 4, 0])==0
  assert smallestNumber([-1, -2, -3, -4])==-4
  assert smallestNumber([0])==0
output: def smallestNumber(nums):
      smallest = nums[0]
      for i in range(1, len(nums)):
          if nums[i] < smallest:
              smallest = nums[i]
      return smallest