input: Write a function to find the smallest number in a given list. The function should iterate through the list and return the smallest number found. If the list is empty, it should return None.
  assert smallestNumber([4, 5, 6, 7, 8])==4
  assert smallestNumber([10, 2, 3, 4, 5])==2
  assert smallestNumber([22, 3, 5, 1, 7])==1
  assert smallestNumber([0, 5, 7, 2, 1])==0
  assert smallestNumber([])==None
output: def smallestNumber(lst):
      if not lst:
          return None
      smallest = lst[0]
      for num in lst:
          if num < smallest:
              smallest = num
      return smallest