input: Write a function to create a program in Python that takes a list of words and an integer n and returns a list of words that appear at least n times in the given list.
  assert frequent_words(['a', 'b', 'a', 'c', 'd', 'a', 'x', 'd', 'd'], 3)==['a', 'd']
  assert frequent_words(['a', 'b', 'c', 'd', 'e'], 2)==[]
  assert frequent_words(['x', 'y', 'z', 'x', 'y', 'x'], 2)==['x', 'y']
  assert frequent_words(['w', 'w', 'w'], 3)==['w']
  assert frequent_words([], 1)==[]
output: def frequent_words(words, n):
      word_count = {}
      for word in words:
          if word in word_count:
              word_count[word] += 1
          else:
              word_count[word] = 1
      return [word for word in word_count if word_count[word] >= n]