Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Bird Language by kavishhh
def translation(text: str) -> str:
# your code here
vowels = "aeiouy"
decoded_words = []
for word in text.split():
decoded = []
i = 0
while i < len(word):
char = word[i]
if char in vowels:
decoded.append(char)
i += 3
else:
decoded.append(char)
i += 2
decoded_words.append("".join(decoded))
return " ".join(decoded_words)
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!")
Oct. 20, 2025
Comments: