input: def auto_complete(dictionary, prefix):
      """Generate a list of word suggestions from a dictionary based on a given prefix.
      
      >>> auto_complete(["dog", "deer", "deal", "dungeon", "dark", "dusk"], "d")
      ['dog', 'deer', 'deal', 'dungeon', 'dark', 'dusk']
      >>> auto_complete(["apple", "banana", "cherry"], "a")
      ['apple']
      """
      # list for words with the given prefix
      prefix_words = []
  
      # iterate through the dictionary
      for word in dictionary:
          # if the word starts with given prefix, 
          # add it to the list
          if word.startswith(prefix):
              prefix_words.append(word)
  
      return prefix_words
output:     return prefix_words