input: Write a function to develop an autocomplete system that predicts words based on the input text. The function should generate word candidates from the input text, filter those candidates, rank them, and return the top 5 words.
  assert autocomplete("hel")==["hello", "help", "helpful", "helmet", "hell"]
  assert autocomplete("progr")==["program", "programming", "programmer", "progress", "project"]
  assert autocomplete("")==[]
  assert autocomplete(None)==[]
  assert autocomplete("computer")==["computer", "computers", "computing", "compute", "comp"]
output: def autocomplete(text):
      if not text:
          return []
      words = ["hello", "help", "helpful", "helmet", "hell", "program", "programming", "programmer", "progress", "project", "computer", "computers", "computing", "compute", "comp"]
      candidates = [word for word in words if word.startswith(text)]
      candidates.sort()
      return candidates[:5]