Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
"While" + move only on good letters solution in Clear category for Bird Language by Kolia951
def translate(sentence: str) -> str:
""" Returns translated text """
VOWELS = ("a", "e", "i", "o", "u", "y")
position = 0
phrase = ""
while position < len(sentence):
if sentence[position] == " ":
phrase += sentence[position]
position += 1
if sentence[position] not in VOWELS:
phrase += sentence[position]
position += 2
elif sentence[position] in VOWELS:
phrase += sentence[position]
position += 3
return phrase
Nov. 23, 2021
Comments: