Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Bird Language by ZakkyR
VOWELS = "aeiouy"
def translate(phrase):
iter_phrase = iter(phrase)
trans = ''
for i in iter_phrase:
trans += i
if i in 'aiueoy':
next(iter_phrase)
next(iter_phrase)
elif i.isalpha():
next(iter_phrase)
return trans
if __name__ == '__main__':
#These "asserts" using only for self-checking and not necessary for auto-testing
assert translate("hieeelalaooo") == "hello", "Hi!"
assert translate("hoooowe yyyooouuu duoooiiine") == "how you doin", "Joey?"
assert translate("aaa bo cy da eee fe") == "a b c d e f", "Alphabet"
assert translate("sooooso aaaaaaaaa") == "sos aaa", "Mayday, mayday"
Dec. 25, 2017