Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Bird Language by BartoszKowalski
VOWELS = "aeiouy"
def translation(phrase):
counter = 1
a = 0
for i in range(len(phrase)):
if len(phrase)>a:
i = phrase[a]
if i=="a" or i=="e" or i=="i" or i=="o" or i=="u" or i=="y":
phrase = phrase[:counter] + phrase[(counter+2):]
elif i==" ":
x = 0
else:
phrase = phrase[:counter] + phrase[(counter+1):]
counter += 1
a += 1
return phrase
if __name__ == '__main__':
#These "asserts" using only for self-checking and not necessary for auto-testing
assert translation("hieeelalaooo") == "hello", "Hi!"
assert translation("hoooowe yyyooouuu duoooiiine") == "how you doin", "Joey?"
assert translation("aaa bo cy da eee fe") == "a b c d e f", "Alphabet"
assert translation("sooooso aaaaaaaaa") == "sos aaa", "Mayday, mayday"
Nov. 23, 2018