Help with pig latin

Hii im having trouble solving the pig latin exercise. For some reason it isn’t working for the full sentence. it passed the test on everything else. But it doenst translate “quick” to “ickquay”. It results to plain “ick”. Im not sure why. Even chatGPT said its ok and it should be working, but its not.

def translate(text):
vogais = (“a”, “e”, “i”, “o”, “u”)
if text[0] in vogais or text[:2] in (“yt”, “xr”):
return text + “ay”
elif text[:2] == “qu”:
return text[2:] + text[:2] + “ay”
elif “qu” in text[:3]:
return text[3:] + text[:3] + “ay”
elif “y” in text[1:3]:
indexy = text.find(“y”)
return text[indexy:] + text[:indexy] + “ay”
fv_index = next((i for i, char in enumerate(text) if char in vogais), None)
return text[fv_index:] + text[:fv_index] + “ay”

  1. Please use codeblocks to share code. Those make code much easier to read.
  2. Please avoid screenshots when sharing text.
  3. The failing tests fail when g there are multiple words, all of which need converting. You probably want to split up the input into separate words and convert each word independently.