What to do with my code for 5 of 5 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What to do with my code for 5 of 5

It's on the task with "Pig latin" normal_sentence = input().split() pig_sentence = "" pig_words = "" pig_list = [] for word in normal_sentence: normal_sentence.append(word[0]) normal_sentence.remove(word[0]) first_letter = word[0] last_letters = "ay" word = word.translate({ord(first_letter): None}) word += word.join(first_letter) pig_sentence += f"{word}{last_letters}" + " " print(pig_sentence)

13th Mar 2020, 2:47 PM
MomchilSotirov
MomchilSotirov - avatar
1 Answer
0
Try input: aaa bbb ccc
13th Mar 2020, 3:39 PM
Mihai Apostol
Mihai Apostol - avatar