def get_guessed_word(secret_word, guessed_letters): 
  """ get the secret word with the correctly guessed letters so far.

  Arguments:
    secret_word (string): the secret, random word that the player should guess
    guessed_letters (list of strings): a list that contains all the valid inputs that the player has ever entered 

  Returns:
    string : the secret word with the correctly guessed letters
  """

  guessed_correctly = ""
  for index in range(len(secret_word)):
    found = False 
    for letter in guessed_letters:
      if secret_word[index] == letter:  # if the guessed letter is in the secret word, add it to the string (guessed_correctly)
        guessed_correctly += letter      
        found = True 
    if not found:
      guessed_correctly += "*"    # if the guessed letter is a wrong guess, add "*" to the string (guessed_correctly)
     
  return guessed_correctly