Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
while solution in Clear category for Bird Language by book1978
def translate(text: str) -> str:
v, n, c = "aeiouy", "", 0
while c < len(text):
n += text[c]
c += 1 if text[c] == " " else (text[c] in v) + 2
return n
print("Example:")
print(translate("hieeelalaooo"))
# These "asserts" are used for self-checking
assert translate("hieeelalaooo") == "hello"
assert translate("hoooowe yyyooouuu duoooiiine") == "how you doin"
assert translate("aaa bo cy da eee fe") == "a b c d e f"
assert translate("sooooso aaaaaaaaa") == "sos aaa"
print("The mission is done! Click 'Check Solution' to earn rewards!")
March 2, 2023
Comments: