My skeleton looks like this
def convertWord(aWord): # define vowels vowel = "aeiouAEIOU" pigWord = "" beginsWithVowel = aWord in vowel hasPunctuation = not aWord[-1].isalnum() if vowel==: aWord+=+'yay' else: aWord+='ay' return pigWord # end convertWord
My book says to use slicing and create a string of vowels with 'aeiou'.
I have tried several problems. My main issue is getting the text from my document (we'll call it 'Text.txt') to convert each word.
if vowel==: aWord=+'yay' else: aWord+='ay'
My Python program says "working...."
But the output file has nothing. None of my exercises showed me how to exactly bring in text from another document and process it and my professor lightly touched on it.