Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Bird list :) solution in Clear category for Bird Language by Fokzterrier
VOWELS = "aeiouy"
samo= ['a','e','i','o','u','y']
spol = ['b','c','d','f','g','h','j','k','l','m','n','p','r','s','t','w','z','x','q']
def translation(phrase):
wynik = ""
i =0
for achar in phrase:
while i < len(phrase):
if phrase[i] in samo:
wynik= wynik + phrase[i]
i=i+3
print(wynik)
elif phrase[i]==" ":
wynik = wynik + " "
i = i + 1
print(wynik)
else:
wynik= wynik + phrase[i]
i=i+2
print(wynik)
return wynik
if __name__ == '__main__':
#These "asserts" using only for self-checking and not necessary for auto-testing
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"
Nov. 12, 2016