input: Write a function to create a dictionary containing numbers from 1 to n as keys and their squares as values. If n is less than 1, return an empty dictionary.
  def build_square_dict(n):
      if n < 1:
          return {}
      my_dict = {}
      for i in range(1, n + 1):
          my_dict[i] = i ** 2
      return my_dict
  assert build_square_dict(10) == {1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6: 36, 7: 49, 8: 64, 9: 81, 10: 100}
  assert build_square_dict(0) == {}
  assert build_square_dict(-5) == {}
  assert build_square_dict(1) == {1: 1}
output: def build_square_dict(n):
      if n < 1:
          return {}
      my_dict = {}
      for i in range(1, n + 1):
          my_dict[i] = i ** 2
      return my_dict