Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Bird Language by arun_maiti
def translation(text: str) -> str:
letters = "aeiouy"
new = ''
index = 0
while index < len(text):
if text[index] == ' ':
new += text[index]
elif text[index] not in letters and text[index + 1] in letters:
new += text[index]
index += 1
elif text[index] in letters:
if text[index:index + 3] == text[index] * 3:
new += text[index]
index += 2
index += 1
return new
print("Example:")
print(translation("hieeelalaooo"))
# These "asserts" are used for self-checking
assert translation("hieeelalaooo") == "hello"
assert translation("hoooowe yyyooouuu duoooiiine") == "how you doin"
assert translation("aaa bo cy da eee fe") == "a b c d e f"
assert translation("sooooso aaaaaaaaa") == "sos aaa"
print("The mission is done! Click 'Check Solution' to earn rewards!")
Dec. 3, 2025
Comments: