+ 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)
1 Odpowiedź
0
Try input:
aaa bbb ccc