def cost( word ): ... ... the function suite (body of the function cost() ... goes here # Notice how much shorter and easier to understand the # main program below here is now. # cost(original) focuses on WHAT is happening. # The details of HOW cost() penny math of the word is # obtained are separated out and located in the function suite. fin = open("dictionary.txt", "r") fout = open("dollarWords2.txt", "w") for original in fin: if cost(original) == 100: fout.write(original) fin.close() fout.close() print("\nThanks and happy homecoming eve!")