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

20th May 2022, 5:16 PM
Chris
2 Answers
+ 1
Don't convert into lower case. Else fine I think.. Is there asked to do it?
20th May 2022, 5:21 PM
Jayakrishna 🇼🇳
+ 2
for i in input().split(): print(i[1:] + i[0] + 'ay', end=' ')
21st May 2022, 2:13 AM
FꫀâČ…áƒ«á„†ÍŸá„™á„‰áŻœ
FꫀâČ…áƒ«á„†ÍŸá„™á„‰áŻœ - avatar