input: Write a function to implement an autocomplete feature for a text editor by generating a list of word suggestions based on a given prefix. The function should take two parameters: a list of words (dictionary) and a string (prefix). It should return a list of words that start with the given prefix.
  
  def auto_complete(dictionary, prefix):
      prefix_words = []
      for word in dictionary:
          if word.startswith(prefix):
              prefix_words.append(word)
      return prefix_words
  
  assert auto_complete(["dog", "deer", "deal", "dungeon", "dark", "dusk"], "d") == ['dog', 'deer', 'deal', 'dungeon', 'dark', 'dusk']
  assert auto_complete(["dog", "deer", "deal", "dungeon", "dark", "dusk"], "de") == ['deer', 'deal']
  assert auto_complete(["dog", "deer", "deal", "dungeon", "dark", "dusk"], "dun") == ['dungeon']
  assert auto_complete(["dog", "deer", "deal", "dungeon", "dark", "dusk"], "e") == []
  assert auto_complete([], "d") == []
output: def auto_complete(dictionary, prefix):
      prefix_words = []
      for word in dictionary:
          if word.startswith(prefix):
              prefix_words.append(word)
      return prefix_words