0
What's wrong with this code???
sentence = input().lower().split() pig_latin = '' for word in sentence: new_word = word.replace(word[0], '') new_word += word[0] + 'ay' pig_latin += new_word + ' ' print(pig_latin) This code does not work in some instances. I tried to identify the issue but I can't find one
2 Answers
+ 1
Don't convert into lower case. Else fine I think..
Is there asked to do it?
+ 2
for i in input().split(): print(i[1:] + i[0] + 'ay', end=' ')