Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Skip iterations solution in Clear category for Bird Language by Wartem
vowels = {'a','e','i','o','u','y'}
def fix_word(word):
'''
Iteration of letter in words (i+=1).
Also:
Skip 1 after each consonant.
Skip 2, after each vowel.
'''
res = ""
i = 0
while(i < len(word)):
res += word[i]
i+=3 if word[i] in vowels else 2
return res
def translate(text: str) -> str:
return ' '.join(map(fix_word, text.split(" ")))
June 18, 2022