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. If the list is empty or the integer n is less than or equal to 0, return an empty list.
  from collections import Counter
  def frequent_words(words, n):
      if not words or n <= 0:
          return []
      counts = Counter(words)
      return [word for word, count in counts.items() if count >= n]
  assert frequent_words(['a', 'b', 'a', 'c', 'd', 'a', 'x', 'd', 'd'], 3) == ['a', 'd']
  assert frequent_words(['a', 'b', 'a', 'c', 'd', 'a', 'x', 'd', 'd'], 2) == ['a', 'd']
  assert frequent_words(['a', 'b', 'a', 'c', 'd', 'a', 'x', 'd', 'd'], 1) == ['a', 'b', 'c', 'd', 'x']
  assert frequent_words([], 3) == []
  assert frequent_words(['a', 'b', 'c'], 0) == []
output: from collections import Counter
  def frequent_words(words, n):
      if not words or n <= 0:
          return []
      counts = Counter(words)
      return [word for word, count in counts.items() if count >= n]