input: Write a function to create an autocomplete system that predicts words based on the input text. The function should generate word candidates, filter them, rank them, and return the top 5 words. If the input text is empty, it should return an empty list.
  assert autocomplete("ca")==["car", "cat", "carrot", "camera", "cart"]
  assert autocomplete("")==[]
  assert autocomplete("comp")==["computer", "company", "complete", "complex", "companies"]
  assert autocomplete("pro")==["program", "problem", "process", "professional", "product"]
  assert autocomplete("te")==["test", "technology", "term", "theory", "temperature"]
output: def autocomplete(text):
      words = ["car", "cat", "carrot", "camera", "cart", "computer", "company", "complete", "complex", "companies", "program", "problem", "process", "professional", "product", "test", "technology", "term", "theory", "temperature"]
      if not text:
          return []
      candidates = [word for word in words if word.startswith(text)]
      candidates.sort()
      return candidates[:5]