CSC 221: Introduction to Programming
Fall 2013

HW5: Text Files and Readability

For PART 1 of this assignment, you may work with one (new) partner.
PART 2 must be completed independently (with assistance from the instructor as needed).

A variety of measures have been developed to characterize the readability of text. Usually, these measures describe readability in terms of grade level, e.g., This sentence is at a seventh grade reading level. For this assignment, you will write Python functions for calculating the readability grade level for files using two different measures.

For example, suppose a text file contained 10 sentences, consisting of 50 words. Those 50 words contained a total of 100 syllables, with 10 of the words having three or more syllables in them. Then,

	 F-K grade level = 0.39*5 + 11.8*2 - 15.59 = 9.96
	 SMOG grade level = 1.043*√30*1 + 3.1291 = 8.84

PART 1: Helper Functions (40%)

Due to the complexity of the English language, identifying the ends of sentences and the number of syllables in a word can be tricky. To make these tasks manageable, we will make the following simplifications: