#Name: #checkoff3_pig_latin.py """ Helper code: You do not need to understand the following code. """ import string WORDLIST_FILENAME = "words.txt" def loadWords(): """ Returns a list of valid words. Words are strings of lowercase letters. Depending on the size of the word list, this function may take a while to finish. """ print "Loading word list from file..." # inFile: file inFile = open(WORDLIST_FILENAME, 'r', 0) # line: string line = inFile.readline() # wordlist: list of strings wordlist = string.split(line) print " ", len(wordlist), "words loaded." return wordlist word_list = loadWords() """ End helper code. """ ############################ ### English-to-Pig-Latin ### ############################ # convert the word to Pig Latin word_to_convert = "boot" # YOUR CODE HERE ############################### ### Pig Latin validity check ### ################################ # Ask the user for a word; print whether the word # is a valid Pig Latin version of a word in word_list, # which is a list of strings # YOUR CODE HERE