input: Write a function to determine if a list of words contains any word that appears at least n times. If such words exist, return them as a list. If no word appears at least n times, return an empty list.
  assert frequent_words(['a', 'b', 'a', 'c', 'd', 'a', 'x', 'd', 'd'],3)==['a', 'd']
  assert frequent_words(['hello', 'world', 'hello', 'hello'],2)==['hello']
  assert frequent_words(['google', 'apple', 'microsoft'],1)==['google', 'apple', 'microsoft']
  assert frequent_words(['a', 'b', 'a', 'd', 'e'],4)==[]
  assert frequent_words([],3)==[]
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
      result = [word for word in word_count if word_count[word] >= n]
      return result