Jun-22-2018, 10:37 PM
Im not sure if I did it right but its still not working.
def pig(): sentence = input("Enter a sentence: ") for word in sentence.split(): first_letter = word[0] newlist = [] if first_letter in "aeiou": word = word + "ay" newlist.append(word) else: word = word[1:] + first_letter + "ay" newlist.append(word) newsent = (" ".join(newlist)) print(newsent) pig()