You need to define at least five functions with function prototypes specified in
ID: 3669516 • Letter: Y
Question
You need to define at least five functions with function prototypes specified in the requirements. Given the content of a book in the form of a list of lists of strings, your program is required to complete these tasks: 1) reports the total number of words and 2) total number of paragraphs; 3) finds the longest paragraph in terms of number of words; 4) displays all common words that have appeared in 5 or more paragraphs. The contents of the book are represented as a list variable named book in file book.py. You need to download the file and copy the variable into your program. In python language.
Requirements
a) Provide the definitions of at least five required functions:
· calculateTotalParagraphs(paragraphs) Returns the total number of paragraphs given a
book in the form of a list parameter named as paragraphs. The parameter “paragraphs” is a list of lists of strings and represents the contents of a book. Each element in the list is a list of strings, and represents a paragraph in the book. The strings inside a list represent the words of a paragraph.
· calculateTotalWords(paragraphs) Returns the total number of words given a book in the form of a list of lists of strings using parameter paragraphs.
· searchLongestParagraph(paragraphs) Returns the paragraph number and total number of words of the paragraph that has the largest number of words. The parameter paragraphs is the same as above functions.
· displayCommonWords(paragraphs) Returns a list of all common words that have appeared in 5 or more paragraphs.
· main() function is the driver that invokes other functions, and produces the program output
· You may define extra functions, but the above five functions are required b) Include sufficient comments for the project, functions, and some particular statements
book = [['', 'the', 'project', 'gutenberg', 'ebook', 'of', 'the', 'declaration', 'of', 'independence'], ['copyright', 'laws', 'are', 'changing', 'all', 'over', 'the', 'world', 'be', 'sure', 'to', 'check', 'the', 'copyright', 'laws', 'for', 'your', 'country', 'before', 'downloading', 'or', 'redistributing', 'this', 'or', 'any', 'other', 'project', 'gutenberg', 'ebook'], ['this', 'header', 'should', 'be', 'the', 'first', 'thing', 'seen', 'when', 'viewing', 'this', 'project', 'gutenberg', 'file', 'please', 'do', 'not', 'remove', 'it', 'do', 'not', 'change', 'or', 'edit', 'the', 'header', 'without', 'written', 'permission'], ['please', 'read', 'the', 'legal', 'small', 'print', 'and', 'other', 'information', 'about', 'the', 'ebook', 'and', 'project', 'gutenberg', 'at', 'the', 'bottom', 'of', 'this', 'file', 'included', 'is', 'important', 'information', 'about', 'your', 'specific', 'rights', 'and', 'restrictions', 'in', 'how', 'the', 'file', 'may', 'be', 'used', 'you', 'can', 'also', 'find', 'out', 'about', 'how', 'to', 'make', 'a', 'donation', 'to', 'project', 'gutenberg', 'and', 'how', 'to', 'get', 'involved'], ['welcome', 'to', 'the', 'world', 'of', 'free', 'plain', 'vanilla', 'electronic', 'texts'], ['ebooks', 'readable', 'by', 'both', 'humans', 'and', 'by', 'computers', 'since'], ['these', 'ebooks', 'were', 'prepared', 'by', 'thousands', 'of', 'volunteers'], ['title', 'the', 'declaration', 'of', 'independence'], ['release', 'date', 'december', 'ebook', 'most', 'recently', 'updated', 'november'], ['edition'], ['language', 'english'], ['the', 'united', 'states', 'declaration', 'of', 'independence', 'was', 'the', 'first', 'etext', 'released', 'by', 'project', 'gutenberg', 'early', 'in', 'the', 'title', 'was', 'stored', 'in', 'an', 'emailed', 'instruction', 'set', 'which', 'required', 'a', 'tape', 'or', 'diskpack', 'be', 'hand', 'mounted', 'for', 'retrieval', 'the', 'diskpack', 'was', 'the', 'size', 'of', 'a', 'large', 'cake', 'in', 'a', 'cake', 'carrier', 'cost', 'and', 'contained', 'megabytes', 'of', 'which', 'this', 'file', 'took', 'two', 'tape', 'backups', 'were', 'kept', 'plus', 'one', 'on', 'paper', 'tape', 'the', 'files', 'we', 'hope', 'to', 'have', 'online', 'by', 'the', 'end', 'of', 'should', 'take', 'about', 'of', 'a', 'comparably', 'priced', 'drive', 'in'], ['this', 'file', 'was', 'never', 'copyrighted', 'sharewared', 'etc', 'and', 'is', 'thus', 'for', 'all', 'to', 'use', 'and', 'copy', 'in', 'any', 'manner', 'they', 'choose', 'please', 'feel', 'free', 'to', 'make', 'your', 'own', 'edition', 'using', 'this', 'as', 'a', 'base'], ['in', 'my', 'research', 'for', 'creating', 'this', 'transcription', 'of', 'our', 'first', 'etext', 'i', 'have', 'come', 'across', 'enough', 'discrepancies', 'even', 'within', 'that', 'official', 'documentation', 'provided', 'by', 'the', 'united', 'states', 'to', 'conclude', 'that', 'even', 'facsimiles', 'of', 'the', 'declaration', 'of', 'indendence', 'will', 'not', 'going', 'to', 'be', 'all', 'the', 'same', 'as', 'the', 'original', 'nor', 'of', 'other', 'facsimiles', 'there', 'is', 'a', 'plethora', 'of', 'variations', 'in', 'capitalization', 'punctuation', 'and', 'even', 'where', 'names', 'appear', 'on', 'the', 'documents', 'which', 'names', 'i', 'have', 'left', 'out'], ['the', 'resulting', 'document', 'has', 'several', 'misspellings', 'removed', 'from', 'those', 'parchment', 'facsimiles', 'i', 'used', 'back', 'in', 'and', 'which', 'i', 'should', 'not', 'be', 'able', 'to', 'easily', 'find', 'at', 'this', 'time', 'including', 'brittain'], ['jt', 'apr', 'brittish', 'however', 'is', 'spelled', 'as', 'in', 'the', 'original'], ['the', 'project', 'gutenberg', 'etext', 'of', 'the', 'declaration', 'of', 'independence'], ['the', 'declaration', 'of', 'independence', 'of', 'the', 'united', 'states', 'of', 'america'], ['in', 'congress', 'july'], ['the', 'unanimous', 'declaration', 'of', 'the', 'thirteen', 'united', 'states', 'of', 'america'], ['when', 'in', 'the', 'course', 'of', 'human', 'events', 'it', 'becomes', 'necessary', 'for', 'one', 'people', 'to', 'dissolve', 'the', 'political', 'bands', 'which', 'have', 'connected', 'them', 'with', 'another', 'and', 'to', 'assume', 'among', 'the', 'powers', 'of', 'the', 'earth', 'the', 'separate', 'and', 'equal', 'station', 'to', 'which', 'the', 'laws', 'of', 'nature', 'and', 'of', 'nature', 's', 'god', 'entitle', 'them', 'a', 'decent', 'respect', 'to', 'the', 'opinions', 'of', 'mankind', 'requires', 'that', 'they', 'should', 'declare', 'the', 'causes', 'which', 'impel', 'them', 'to', 'the', 'separation'], ['we', 'hold', 'these', 'truths', 'to', 'be', 'self', 'evident', 'that', 'all', 'men', 'are', 'created', 'equal', 'that', 'they', 'are', 'endowed', 'by', 'their', 'creator', 'with', 'certain', 'unalienable', 'rights', 'that', 'among', 'these', 'are', 'life', 'liberty', 'and', 'the', 'pursuit', 'of', 'happiness', 'that', 'to', 'secure', 'these', 'rights', 'governments', 'are', 'instituted', 'among', 'men', 'deriving', 'their', 'just', 'powers', 'from', 'the', 'consent', 'of', 'the', 'governed', 'that', 'whenever', 'any', 'form', 'of', 'government', 'becomes', 'destructive', 'of', 'these', 'ends', 'it', 'is', 'the', 'right', 'of', 'the', 'people', 'to', 'alter', 'or', 'to', 'abolish', 'it', 'and', 'to', 'institute', 'new', 'government', 'laying', 'its', 'foundation', 'on', 'such', 'principles', 'and', 'organizing', 'its', 'powers', 'in', 'such', 'form', 'as', 'to', 'them', 'shall', 'seem', 'most', 'likely', 'to', 'effect', 'their', 'safety', 'and', 'happiness', 'prudence', 'indeed', 'will', 'dictate', 'that', 'governments', 'long', 'established', 'should', 'not', 'be', 'changed', 'for', 'light', 'and', 'transient', 'causes', 'and', 'accordingly', 'all', 'experience', 'hath', 'shown', 'that', 'mankind', 'are', 'more', 'disposed', 'to', 'suffer', 'while', 'evils', 'are', 'sufferable', 'than', 'to', 'right', 'themselves', 'by', 'abolishing', 'the', 'forms', 'to', 'which', 'they', 'are', 'accustomed', 'but', 'when', 'a', 'long', 'train', 'of', 'abuses', 'and', 'usurpations', 'pursuing', 'invariably', 'the', 'same', 'object', 'evinces', 'a', 'design', 'to', 'reduce', 'them', 'under', 'absolute', 'despotism', 'it', 'is', 'their', 'right', 'it', 'is', 'their', 'duty', 'to', 'throw', 'off', 'such', 'government', 'and', 'to', 'provide', 'new', 'guards', 'for', 'their', 'future', 'security', 'such', 'has', 'been', 'the', 'patient', 'sufferance', 'of', 'these', 'colonies', 'and', 'such', 'is', 'now', 'the', 'necessity', 'which', 'constrains', 'them', 'to', 'alter', 'their', 'former', 'systems', 'of', 'government', 'the', 'history', 'of', 'the', 'present', 'king', 'of', 'great', 'britain', 'is', 'a', 'history', 'of', 'repeated', 'injuries', 'and', 'usurpations', 'all', 'having', 'in', 'direct', 'object', 'the', 'establishment', 'of', 'an', 'absolute', 'tyranny', 'over', 'these', 'states', 'to', 'prove', 'this', 'let', 'facts', 'be', 'submitted', 'to', 'a', 'candid', 'world'], ['he', 'has', 'refused', 'his', 'assent', 'to', 'laws', 'the', 'most', 'wholesome', 'and', 'necessary', 'for', 'the', 'public', 'good'], ['he', 'has', 'forbidden', 'his', 'governors', 'to', 'pass', 'laws', 'of', 'immediate', 'and', 'pressing', 'importance', 'unless', 'suspended', 'in', 'their', 'operation', 'till', 'his', 'assent', 'should', 'be', 'obtained', 'and', 'when', 'so', 'suspended', 'he', 'has', 'utterly', 'neglected', 'to', 'attend', 'to', 'them'], ['he', 'has', 'refused', 'to', 'pass', 'other', 'laws', 'for', 'the', 'accommodation', 'of', 'large', 'districts', 'of', 'people', 'unless', 'those', 'people', 'would', 'relinquish', 'the', 'right', 'of', 'representation', 'in', 'the', 'legislature', 'a', 'right', 'inestimable', 'to', 'them', 'and', 'formidable', 'to', 'tyrants', 'only'], ['he', 'has', 'called', 'together', 'legislative', 'bodies', 'at', 'places', 'unusual', 'uncomfortable', 'and', 'distant', 'from', 'the', 'depository', 'of', 'their', 'public', 'records', 'for', 'the', 'sole', 'purpose', 'of', 'fatiguing', 'them', 'into', 'compliance', 'with', 'his', 'measures'], ['he', 'has', 'dissolved', 'representative', 'houses', 'repeatedly', 'for', 'opposing', 'with', 'manly', 'firmness', 'his', 'invasions', 'on', 'the', 'rights', 'of', 'the', 'people'], ['he', 'has', 'refused', 'for', 'a', 'long', 'time', 'after', 'such', 'dissolutions', 'to', 'cause', 'others', 'to', 'be', 'elected', 'whereby', 'the', 'legislative', 'powers', 'incapable', 'of', 'annihilation', 'have', 'returned', 'to', 'the', 'people', 'at', 'large', 'for', 'their', 'exercise', 'the', 'state', 'remaining', 'in', 'the', 'mean', 'time', 'exposed', 'to', 'all', 'the', 'dangers', 'of', 'invasion', 'from', 'without', 'and', 'convulsions', 'within'], ['he', 'has', 'endeavoured', 'to', 'prevent', 'the', 'population', 'of', 'these', 'states', 'for', 'that', 'purpose', 'obstructing', 'the', 'laws', 'of', 'naturalization', 'of', 'foreigners', 'refusing', 'to', 'pass', 'others', 'to', 'encourage', 'their', 'migration', 'hither', 'and', 'raising', 'the', 'conditions', 'of', 'new', 'appropriations', 'of', 'lands'], ['he', 'has', 'obstructed', 'the', 'administration', 'of', 'justice', 'by', 'refusing', 'his', 'assent', 'to', 'laws', 'for', 'establishing', 'judiciary', 'powers'], ['he', 'has', 'made', 'judges', 'dependent', 'on', 'his', 'will', 'alone', 'for', 'the', 'tenure', 'of', 'their', 'offices', 'and', 'the', 'amount', 'and', 'payment', 'of', 'their', 'salaries'], ['he', 'has', 'erected', 'a', 'multitude', 'of', 'new', 'offices', 'and', 'sent', 'hither', 'swarms', 'of', 'officers', 'to', 'harass', 'our', 'people', 'and', 'eat', 'out', 'their', 'substance'], ['he', 'has', 'kept', 'among', 'us', 'in', 'times', 'of', 'peace', 'standing', 'armies', 'without', 'the', 'consent', 'of', 'our', 'legislatures'], ['he', 'has', 'affected', 'to', 'render', 'the', 'military', 'independent', 'of', 'and', 'superior', 'to', 'the', 'civil', 'power'], ['he', 'has', 'combined', 'with', 'others', 'to', 'subject', 'us', 'to', 'a', 'jurisdiction', 'foreign', 'to', 'our', 'constitution', 'and', 'unacknowledged', 'by', 'our', 'laws', 'giving', 'his', 'assent', 'to', 'their', 'acts', 'of', 'pretended', 'legislation'], ['for', 'quartering', 'large', 'bodies', 'of', 'armed', 'troops', 'among', 'us'], ['for', 'protecting', 'them', 'by', 'a', 'mock', 'trial', 'from', 'punishment', 'for', 'any', 'murders', 'which', 'they', 'should', 'commit', 'on', 'the', 'inhabitants', 'of', 'these', 'states'], ['for', 'cutting', 'off', 'our', 'trade', 'with', 'all', 'parts', 'of', 'the', 'world'], ['for', 'imposing', 'taxes', 'on', 'us', 'without', 'our', 'consent'], ['for', 'depriving', 'us', 'in', 'many', 'cases', 'of', 'the', 'benefits', 'of', 'trial', 'by', 'jury'], ['for', 'transporting', 'us', 'beyond', 'seas', 'to', 'be', 'tried', 'for', 'pretended', 'offences'], ['for', 'abolishing', 'the', 'free', 'system', 'of', 'english', 'laws', 'in', 'a', 'neighbouring', 'province', 'establishing', 'therein', 'an', 'arbitrary', 'government', 'and', 'enlarging', 'its', 'boundaries', 'so', 'as', 'to', 'render', 'it', 'at', 'once', 'an', 'example', 'and', 'fit', 'instrument', 'for', 'introducing', 'the', 'same', 'absolute', 'rule', 'into', 'these', 'colonies'], ['for', 'taking', 'away', 'our', 'charters', 'abolishing', 'our', 'most', 'valuable', 'laws', 'and', 'altering', 'fundamentally', 'the', 'forms', 'of', 'our', 'governments'], ['for', 'suspending', 'our', 'own', 'legislatures', 'and', 'declaring', 'themselves', 'invested', 'with', 'power', 'to', 'legislate', 'for', 'us', 'in', 'all', 'cases', 'whatsoever'], ['he', 'has', 'abdicated', 'government', 'here', 'by', 'declaring', 'us', 'out', 'of', 'his', 'protection', 'and', 'waging', 'war', 'against', 'us'], ['he', 'has', 'plundered', 'our', 'seas', 'ravaged', 'our', 'coasts', 'burnt', 'our', 'towns', 'and', 'destroyed', 'the', 'lives', 'of', 'our', 'people'], ['he', 'is', 'at', 'this', 'time', 'transporting', 'large', 'armies', 'of', 'foreign', 'mercenaries', 'to', 'compleat', 'the', 'works', 'of', 'death', 'desolation', 'and', 'tyranny', 'already', 'begun', 'with', 'circumstances', 'of', 'cruelty', 'perfidy', 'scarcely', 'paralleled', 'in', 'the', 'most', 'barbarous', 'ages', 'and', 'totally', 'unworthy', 'of', 'the', 'head', 'of', 'a', 'civilized', 'nation'], ['he', 'has', 'constrained', 'our', 'fellow', 'citizens', 'taken', 'captive', 'on', 'the', 'high', 'seas', 'to', 'bear', 'arms', 'against', 'their', 'country', 'to', 'become', 'the', 'executioners', 'of', 'their', 'friends', 'and', 'brethren', 'or', 'to', 'fall', 'themselves', 'by', 'their', 'hands'], ['he', 'has', 'excited', 'domestic', 'insurrections', 'amongst', 'us', 'and', 'has', 'endeavoured', 'to', 'bring', 'on', 'the', 'inhabitants', 'of', 'our', 'frontiers', 'the', 'merciless', 'indian', 'savages', 'whose', 'known', 'rule', 'of', 'warfare', 'is', 'an', 'undistinguished', 'destruction', 'of', 'all', 'ages', 'sexes', 'and', 'conditions'], ['in', 'every', 'stage', 'of', 'these', 'oppressions', 'we', 'have', 'petitioned', 'for', 'redress', 'in', 'the', 'most', 'humble', 'terms', 'our', 'repeated', 'petitions', 'have', 'been', 'answered', 'only', 'by', 'repeated', 'injury', 'a', 'prince', 'whose', 'character', 'is', 'thus', 'marked', 'by', 'every', 'act', 'which', 'may', 'define', 'a', 'tyrant', 'is', 'unfit', 'to', 'be', 'the', 'ruler', 'of', 'a', 'free', 'people'], ['nor', 'have', 'we', 'been', 'wanting', 'in', 'attention', 'to', 'our', 'brittish', 'brethren', 'we', 'have', 'warned', 'them', 'from', 'time', 'to', 'time', 'of', 'attempts', 'by', 'their', 'legislature', 'to', 'extend', 'an', 'unwarrantable', 'jurisdiction', 'over', 'us', 'we', 'have', 'reminded', 'them', 'of', 'the', 'circumstances', 'of', 'our', 'emigration', 'and', 'settlement', 'here', 'we', 'have', 'appealed', 'to', 'their', 'native', 'justice', 'and', 'magnanimity', 'and', 'we', 'have', 'conjured', 'them', 'by', 'the', 'ties', 'of', 'our', 'common', 'kindred', 'to', 'disavow', 'these', 'usurpations', 'which', 'would', 'inevitably', 'interrupt', 'our', 'connections', 'and', 'correspondence', 'they', 'too', 'have', 'been', 'deaf', 'to', 'the', 'voice', 'of', 'justice', 'and', 'of', 'consanguinity', 'we', 'must', 'therefore', 'acquiesce', 'in', 'the', 'necessity', 'which', 'denounces', 'our', 'separation', 'and', 'hold', 'them', 'as', 'we', 'hold', 'the', 'rest', 'of', 'mankind', 'enemies', 'in', 'war', 'in', 'peace', 'friends'], ['we', 'therefore', 'the', 'representatives', 'of', 'the', 'united', 'states', 'of', 'america', 'in', 'general', 'congress', 'assembled', 'appealing', 'to', 'the', 'supreme', 'judge', 'of', 'the', 'world', 'for', 'the', 'rectitude', 'of', 'our', 'intentions', 'do', 'in', 'the', 'name', 'and', 'by', 'the', 'authority', 'of', 'the', 'good', 'people', 'of', 'these', 'colonies', 'solemnly', 'publish', 'and', 'declare', 'that', 'these', 'united', 'colonies', 'are', 'and', 'of', 'right', 'ought', 'to', 'be', 'free', 'and', 'independent', 'states', 'that', 'they', 'are', 'absolved', 'from', 'all', 'allegiance', 'to', 'the', 'british', 'crown', 'and', 'that', 'all', 'political', 'connection', 'between', 'them', 'and', 'the', 'state', 'of', 'great', 'britain', 'is', 'and', 'ought', 'to', 'be', 'totally', 'dissolved', 'and', 'that', 'as', 'free', 'and', 'independent', 'states', 'they', 'have', 'full', 'power', 'to', 'levy', 'war', 'conclude', 'peace', 'contract', 'alliances', 'establish', 'commerce', 'and', 'to', 'do', 'all', 'other', 'acts', 'and', 'things', 'which', 'independent', 'states', 'may', 'of', 'right', 'do', 'and', 'for', 'the', 'support', 'of', 'this', 'declaration', 'with', 'a', 'firm', 'reliance', 'on', 'the', 'protection', 'of', 'divine', 'providence', 'we', 'mutually', 'pledge', 'to', 'each', 'other', 'our', 'lives', 'our', 'fortunes', 'and', 'our', 'sacred', 'honor'], ['end', 'of', 'the', 'project', 'gutenberg', 'ebook', 'of', 'the', 'declaration', 'of', 'independence'], ['this', 'file', 'should', 'be', 'named', 'when', 'txt', 'or', 'when', 'zip'], ['corrected', 'editions', 'of', 'our', 'ebooks', 'get', 'a', 'new', 'number', 'when', 'txt', 'versions', 'based', 'on', 'separate', 'sources', 'get', 'new', 'letter', 'when', 'a', 'txt'], ['this', 'etext', 'was', 'produced', 'by', 'michael', 's', 'hart'], ['project', 'gutenberg', 'ebooks', 'are', 'often', 'created', 'from', 'several', 'printed', 'editions', 'all', 'of', 'which', 'are', 'confirmed', 'as', 'public', 'domain', 'in', 'the', 'us', 'unless', 'a', 'copyright', 'notice', 'is', 'included', 'thus', 'we', 'usually', 'do', 'not', 'keep', 'ebooks', 'in', 'compliance', 'with', 'any', 'particular', 'paper', 'edition'], ['we', 'are', 'now', 'trying', 'to', 'release', 'all', 'our', 'ebooks', 'one', 'year', 'in', 'advance', 'of', 'the', 'official', 'release', 'dates', 'leaving', 'time', 'for', 'better', 'editing', 'please', 'be', 'encouraged', 'to', 'tell', 'us', 'about', 'any', 'error', 'or', 'corrections', 'even', 'years', 'after', 'the', 'official', 'publication', 'date'], ['please', 'note', 'neither', 'this', 'listing', 'nor', 'its', 'contents', 'are', 'final', 'til', 'midnight', 'of', 'the', 'last', 'day', 'of', 'the', 'month', 'of', 'any', 'such', 'announcement', 'the', 'official', 'release', 'date', 'of', 'all', 'project', 'gutenberg', 'ebooks', 'is', 'at', 'midnight', 'central', 'time', 'of', 'the', 'last', 'day', 'of', 'the', 'stated', 'month', 'a', 'preliminary', 'version', 'may', 'often', 'be', 'posted', 'for', 'suggestion', 'comment', 'and', 'editing', 'by', 'those', 'who', 'wish', 'to', 'do', 'so'], ['most', 'people', 'start', 'at', 'our', 'web', 'sites', 'at', 'http', 'gutenberg', 'net', 'or', 'http', 'promo', 'net', 'pg'], ['these', 'web', 'sites', 'include', 'award', 'winning', 'information', 'about', 'project', 'gutenberg', 'including', 'how', 'to', 'donate', 'how', 'to', 'help', 'produce', 'our', 'new', 'ebooks', 'and', 'how', 'to', 'subscribe', 'to', 'our', 'email', 'newsletter', 'free'], ['those', 'of', 'you', 'who', 'want', 'to', 'download', 'any', 'ebook', 'before', 'announcement', 'can', 'get', 'to', 'them', 'as', 'follows', 'and', 'just', 'download', 'by', 'date', 'this', 'is', 'also', 'a', 'good', 'way', 'to', 'get', 'them', 'instantly', 'upon', 'announcement', 'as', 'the', 'indexes', 'our', 'cataloguers', 'produce', 'obviously', 'take', 'a', 'while', 'after', 'an', 'announcement', 'goes', 'out', 'in', 'the', 'project', 'gutenberg', 'newsletter'], ['http', 'www', 'ibiblio', 'org', 'gutenberg', 'etext', 'or', 'ftp', 'ftp', 'ibiblio', 'org', 'pub', 'docs', 'books', 'gutenberg', 'etext'], ['or', 'etext', 'or'], ['just', 'search', 'by', 'the', 'first', 'five', 'letters', 'of', 'the', 'filename', 'you', 'want', 'as', 'it', 'appears', 'in', 'our', 'newsletters'], ['information', 'about', 'project', 'gutenberg', 'one', 'page'], ['we', 'produce', 'about', 'two', 'million', 'dollars', 'for', 'each', 'hour', 'we', 'work', 'the', 'time', 'it', 'takes', 'us', 'a', 'rather', 'conservative', 'estimate', 'is', 'fifty', 'hours', 'to', 'get', 'any', 'ebook', 'selected', 'entered', 'proofread', 'edited', 'copyright', 'searched', 'and', 'analyzed', 'the', 'copyright', 'letters', 'written', 'etc', 'our', 'projected', 'audience', 'is', 'one', 'hundred', 'million', 'readers', 'if', 'the', 'value', 'per', 'text', 'is', 'nominally', 'estimated', 'at', 'one', 'dollar', 'then', 'we', 'produce', 'million', 'dollars', 'per', 'hour', 'in', 'as', 'we', 'release', 'over', 'new', 'text', 'files', 'per', 'month', 'more', 'ebooks', 'in', 'for', 'a', 'total', 'of', 'we', 'are', 'already', 'on', 'our', 'way', 'to', 'trying', 'for', 'more', 'ebooks', 'in', 'if', 'they', 'reach', 'just', 'of', 'the', 'world', 's', 'population', 'then', 'the', 'total', 'will', 'reach', 'over', 'half', 'a', 'trillion', 'ebooks', 'given', 'away', 'by', 'year', 's', 'end'], ['the', 'goal', 'of', 'project', 'gutenberg', 'is', 'to', 'give', 'away', 'trillion', 'ebooks', 'this', 'is', 'ten', 'thousand', 'titles', 'each', 'to', 'one', 'hundred', 'million', 'readers', 'which', 'is', 'only', 'about', 'of', 'the', 'present', 'number', 'of', 'computer', 'users'], ['here', 'is', 'the', 'briefest', 'record', 'of', 'our', 'progress', 'means', 'estimated'], ['ebooks', 'year', 'month'], ['july', 'january', 'january', 'august', 'october', 'december', 'december', 'november', 'october', 'november', 'december', 'november', 'january'], ['the', 'project', 'gutenberg', 'literary', 'archive', 'foundation', 'has', 'been', 'created', 'to', 'secure', 'a', 'future', 'for', 'project', 'gutenberg', 'into', 'the', 'next', 'millennium'], ['we', 'need', 'your', 'donations', 'more', 'than', 'ever'], ['as', 'of', 'february', 'contributions', 'are', 'being', 'solicited', 'from', 'people', 'and', 'organizations', 'in', 'alabama', 'alaska', 'arkansas', 'connecticut', 'delaware', 'district', 'of', 'columbia', 'florida', 'georgia', 'hawaii', 'illinois', 'indiana', 'iowa', 'kansas', 'kentucky', 'louisiana', 'maine', 'massachusetts', 'michigan', 'mississippi', 'missouri', 'montana', 'nebraska', 'nevada', 'new', 'hampshire', 'new', 'jersey', 'new', 'mexico', 'new', 'york', 'north', 'carolina', 'ohio', 'oklahoma', 'oregon', 'pennsylvania', 'rhode', 'island', 'south', 'carolina', 'south', 'dakota', 'tennessee', 'texas', 'utah', 'vermont', 'virginia', 'washington', 'west', 'virginia', 'wisconsin', 'and', 'wyoming'], ['we', 'have', 'filed', 'in', 'all', 'states', 'now', 'but', 'these', 'are', 'the', 'only', 'ones', 'that', 'have', 'responded'], ['as', 'the', 'requirements', 'for', 'other', 'states', 'are', 'met', 'additions', 'to', 'this', 'list', 'will', 'be', 'made', 'and', 'fund', 'raising', 'will', 'begin', 'in', 'the', 'additional', 'states', 'please', 'feel', 'free', 'to', 'ask', 'to', 'check', 'the', 'status', 'of', 'your', 'state'], ['in', 'answer', 'to', 'various', 'questions', 'we', 'have', 'received', 'on', 'this'], ['we', 'are', 'constantly', 'working', 'on', 'finishing', 'the', 'paperwork', 'to', 'legally', 'request', 'donations', 'in', 'all', 'states', 'if', 'your', 'state', 'is', 'not', 'listed', 'and', 'you', 'would', 'like', 'to', 'know', 'if', 'we', 'have', 'added', 'it', 'since', 'the', 'list', 'you', 'have', 'just', 'ask'], ['while', 'we', 'cannot', 'solicit', 'donations', 'from', 'people', 'in', 'states', 'where', 'we', 'are', 'not', 'yet', 'registered', 'we', 'know', 'of', 'no', 'prohibition', 'against', 'accepting', 'donations', 'from', 'donors', 'in', 'these', 'states', 'who', 'approach', 'us', 'with', 'an', 'offer', 'to', 'donate'], ['international', 'donations', 'are', 'accepted', 'but', 'we', 'don', 't', 'know', 'anything', 'about', 'how', 'to', 'make', 'them', 'tax', 'deductible', 'or', 'even', 'if', 'they', 'can', 'be', 'made', 'deductible', 'and', 'don', 't', 'have', 'the', 'staff', 'to', 'handle', 'it', 'even', 'if', 'there', 'are', 'ways'], ['donations', 'by', 'check', 'or', 'money', 'order', 'may', 'be', 'sent', 'to'], ['project', 'gutenberg', 'literary', 'archive', 'foundation', 'pmb', 'university', 'ave', 'oxford', 'ms'], ['contact', 'us', 'if', 'you', 'want', 'to', 'arrange', 'for', 'a', 'wire', 'transfer', 'or', 'payment', 'method', 'other', 'than', 'by', 'check', 'or', 'money', 'order'], ['the', 'project', 'gutenberg', 'literary', 'archive', 'foundation', 'has', 'been', 'approved', 'by', 'the', 'us', 'internal', 'revenue', 'service', 'as', 'a', 'c', 'organization', 'with', 'ein', 'employee', 'identification', 'number', 'donations', 'are', 'tax', 'deductible', 'to', 'the', 'maximum', 'extent', 'permitted', 'by', 'law', 'as', 'fund', 'raising', 'requirements', 'for', 'other', 'states', 'are', 'met', 'additions', 'to', 'this', 'list', 'will', 'be', 'made', 'and', 'fund', 'raising', 'will', 'begin', 'in', 'the', 'additional', 'states'], ['we', 'need', 'your', 'donations', 'more', 'than', 'ever'], ['you', 'can', 'get', 'up', 'to', 'date', 'donation', 'information', 'online', 'at'], ['http', 'www', 'gutenberg', 'net', 'donation', 'html'], ['if', 'you', 'can', 't', 'reach', 'project', 'gutenberg', 'you', 'can', 'always', 'email', 'directly', 'to'], ['michael', 's', 'hart', 'hart', 'pobox', 'com'], ['prof', 'hart', 'will', 'answer', 'or', 'forward', 'your', 'message'], ['we', 'would', 'prefer', 'to', 'send', 'you', 'information', 'by', 'email'], ['the', 'legal', 'small', 'print'], ['three', 'pages'], ['start', 'the', 'small', 'print', 'for', 'public', 'domain', 'ebooks', 'start', 'why', 'is', 'this', 'small', 'print', 'statement', 'here', 'you', 'know', 'lawyers', 'they', 'tell', 'us', 'you', 'might', 'sue', 'us', 'if', 'there', 'is', 'something', 'wrong', 'with', 'your', 'copy', 'of', 'this', 'ebook', 'even', 'if', 'you', 'got', 'it', 'for', 'free', 'from', 'someone', 'other', 'than', 'us', 'and', 'even', 'if', 'what', 's', 'wrong', 'is', 'not', 'our', 'fault', 'so', 'among', 'other', 'things', 'this', 'small', 'print', 'statement', 'disclaims', 'most', 'of', 'our', 'liability', 'to', 'you', 'it', 'also', 'tells', 'you', 'how', 'you', 'may', 'distribute', 'copies', 'of', 'this', 'ebook', 'if', 'you', 'want', 'to'], ['before', 'you', 'use', 'or', 'read', 'this', 'ebook', 'by', 'using', 'or', 'reading', 'any', 'part', 'of', 'this', 'project', 'gutenberg', 'tm', 'ebook', 'you', 'indicate', 'that', 'you', 'understand', 'agree', 'to', 'and', 'accept', 'this', 'small', 'print', 'statement', 'if', 'you', 'do', 'not', 'you', 'can', 'receive', 'a', 'refund', 'of', 'the', 'money', 'if', 'any', 'you', 'paid', 'for', 'this', 'ebook', 'by', 'sending', 'a', 'request', 'within', 'days', 'of', 'receiving', 'it', 'to', 'the', 'person', 'you', 'got', 'it', 'from', 'if', 'you', 'received', 'this', 'ebook', 'on', 'a', 'physical', 'medium', 'such', 'as', 'a', 'disk', 'you', 'must', 'return', 'it', 'with', 'your', 'request'], ['about', 'project', 'gutenberg', 'tm', 'ebooks', 'this', 'project', 'gutenberg', 'tm', 'ebook', 'like', 'most', 'project', 'gutenberg', 'tm', 'ebooks', 'is', 'a', 'public', 'domain', 'work', 'distributed', 'by', 'professor', 'michael', 's', 'hart', 'through', 'the', 'project', 'gutenberg', 'association', 'the', 'project', 'among', 'other', 'things', 'this', 'means', 'that', 'no', 'one', 'owns', 'a', 'united', 'states', 'copyright', 'on', 'or', 'for', 'this', 'work', 'so', 'the', 'project', 'and', 'you', 'can', 'copy', 'and', 'distribute', 'it', 'in', 'the', 'united', 'states', 'without', 'permission', 'and', 'without', 'paying', 'copyright', 'royalties', 'special', 'rules', 'set', 'forth', 'below', 'apply', 'if', 'you', 'wish', 'to', 'copy', 'and', 'distribute', 'this', 'ebook', 'under', 'the', 'project', 'gutenberg', 'trademark'], ['please', 'do', 'not', 'use', 'the', 'project', 'gutenberg', 'trademark', 'to', 'market', 'any', 'commercial', 'products', 'without', 'permission'], ['to', 'create', 'these', 'ebooks', 'the', 'project', 'expends', 'considerable', 'efforts', 'to', 'identify', 'transcribe', 'and', 'proofread', 'public', 'domain', 'works', 'despite', 'these', 'efforts', 'the', 'project', 's', 'ebooks', 'and', 'any', 'medium', 'they', 'may', 'be', 'on', 'may', 'contain', 'defects', 'among', 'other', 'things', 'defects', 'may', 'take', 'the', 'form', 'of', 'incomplete', 'inaccurate', 'or', 'corrupt', 'data', 'transcription', 'errors', 'a', 'copyright', 'or', 'other', 'intellectual', 'property', 'infringement', 'a', 'defective', 'or', 'damaged', 'disk', 'or', 'other', 'ebook', 'medium', 'a', 'computer', 'virus', 'or', 'computer', 'codes', 'that', 'damage', 'or', 'cannot', 'be', 'read', 'by', 'your', 'equipment'], ['limited', 'warranty', 'disclaimer', 'of', 'damages', 'but', 'for', 'the', 'right', 'of', 'replacement', 'or', 'refund', 'described', 'below', 'michael', 'hart', 'and', 'the', 'foundation', 'and', 'any', 'other', 'party', 'you', 'may', 'receive', 'this', 'ebook', 'from', 'as', 'a', 'project', 'gutenberg', 'tm', 'ebook', 'disclaims', 'all', 'liability', 'to', 'you', 'for', 'damages', 'costs', 'and', 'expenses', 'including', 'legal', 'fees', 'and', 'you', 'have', 'no', 'remedies', 'for', 'negligence', 'or', 'under', 'strict', 'liability', 'or', 'for', 'breach', 'of', 'warranty', 'or', 'contract', 'including', 'but', 'not', 'limited', 'to', 'indirect', 'consequential', 'punitive', 'or', 'incidental', 'damages', 'even', 'if', 'you', 'give', 'notice', 'of', 'the', 'possibility', 'of', 'such', 'damages'], ['if', 'you', 'discover', 'a', 'defect', 'in', 'this', 'ebook', 'within', 'days', 'of', 'receiving', 'it', 'you', 'can', 'receive', 'a', 'refund', 'of', 'the', 'money', 'if', 'any', 'you', 'paid', 'for', 'it', 'by', 'sending', 'an', 'explanatory', 'note', 'within', 'that', 'time', 'to', 'the', 'person', 'you', 'received', 'it', 'from', 'if', 'you', 'received', 'it', 'on', 'a', 'physical', 'medium', 'you', 'must', 'return', 'it', 'with', 'your', 'note', 'and', 'such', 'person', 'may', 'choose', 'to', 'alternatively', 'give', 'you', 'a', 'replacement', 'copy', 'if', 'you', 'received', 'it', 'electronically', 'such', 'person', 'may', 'choose', 'to', 'alternatively', 'give', 'you', 'a', 'second', 'opportunity', 'to', 'receive', 'it', 'electronically'], ['this', 'ebook', 'is', 'otherwise', 'provided', 'to', 'you', 'as', 'is', 'no', 'other', 'warranties', 'of', 'any', 'kind', 'express', 'or', 'implied', 'are', 'made', 'to', 'you', 'as', 'to', 'the', 'ebook', 'or', 'any', 'medium', 'it', 'may', 'be', 'on', 'including', 'but', 'not', 'limited', 'to', 'warranties', 'of', 'merchantability', 'or', 'fitness', 'for', 'a', 'particular', 'purpose'], ['some', 'states', 'do', 'not', 'allow', 'disclaimers', 'of', 'implied', 'warranties', 'or', 'the', 'exclusion', 'or', 'limitation', 'of', 'consequential', 'damages', 'so', 'the', 'above', 'disclaimers', 'and', 'exclusions', 'may', 'not', 'apply', 'to', 'you', 'and', 'you', 'may', 'have', 'other', 'legal', 'rights'], ['indemnity', 'you', 'will', 'indemnify', 'and', 'hold', 'michael', 'hart', 'the', 'foundation', 'and', 'its', 'trustees', 'and', 'agents', 'and', 'any', 'volunteers', 'associated', 'with', 'the', 'production', 'and', 'distribution', 'of', 'project', 'gutenberg', 'tm', 'texts', 'harmless', 'from', 'all', 'liability', 'cost', 'and', 'expense', 'including', 'legal', 'fees', 'that', 'arise', 'directly', 'or', 'indirectly', 'from', 'any', 'of', 'the', 'following', 'that', 'you', 'do', 'or', 'cause', 'distribution', 'of', 'this', 'ebook', 'alteration', 'modification', 'or', 'addition', 'to', 'the', 'ebook', 'or', 'any', 'defect'], ['distribution', 'under', 'project', 'gutenberg', 'tm', 'you', 'may', 'distribute', 'copies', 'of', 'this', 'ebook', 'electronically', 'or', 'by', 'disk', 'book', 'or', 'any', 'other', 'medium', 'if', 'you', 'either', 'delete', 'this', 'small', 'print', 'and', 'all', 'other', 'references', 'to', 'project', 'gutenberg', 'or'], ['only', 'give', 'exact', 'copies', 'of', 'it', 'among', 'other', 'things', 'this', 'requires', 'that', 'you', 'do', 'not', 'remove', 'alter', 'or', 'modify', 'the', 'ebook', 'or', 'this', 'small', 'print', 'statement', 'you', 'may', 'however', 'if', 'you', 'wish', 'distribute', 'this', 'ebook', 'in', 'machine', 'readable', 'binary', 'compressed', 'mark', 'up', 'or', 'proprietary', 'form', 'including', 'any', 'form', 'resulting', 'from', 'conversion', 'by', 'word', 'processing', 'or', 'hypertext', 'software', 'but', 'only', 'so', 'long', 'as', 'either'], ['the', 'ebook', 'when', 'displayed', 'is', 'clearly', 'readable', 'and', 'does', 'not', 'contain', 'characters', 'other', 'than', 'those', 'intended', 'by', 'the', 'author', 'of', 'the', 'work', 'although', 'tilde', 'asterisk', 'and', 'underline', 'characters', 'may', 'be', 'used', 'to', 'convey', 'punctuation', 'intended', 'by', 'the', 'author', 'and', 'additional', 'characters', 'may', 'be', 'used', 'to', 'indicate', 'hypertext', 'links', 'or'], ['the', 'ebook', 'may', 'be', 'readily', 'converted', 'by', 'the', 'reader', 'at', 'no', 'expense', 'into', 'plain', 'ascii', 'ebcdic', 'or', 'equivalent', 'form', 'by', 'the', 'program', 'that', 'displays', 'the', 'ebook', 'as', 'is', 'the', 'case', 'for', 'instance', 'with', 'most', 'word', 'processors', 'or'], ['you', 'provide', 'or', 'agree', 'to', 'also', 'provide', 'on', 'request', 'at', 'no', 'additional', 'cost', 'fee', 'or', 'expense', 'a', 'copy', 'of', 'the', 'ebook', 'in', 'its', 'original', 'plain', 'ascii', 'form', 'or', 'in', 'ebcdic', 'or', 'other', 'equivalent', 'proprietary', 'form'], ['honor', 'the', 'ebook', 'refund', 'and', 'replacement', 'provisions', 'of', 'this', 'small', 'print', 'statement'], ['pay', 'a', 'trademark', 'license', 'fee', 'to', 'the', 'foundation', 'of', 'of', 'the', 'gross', 'profits', 'you', 'derive', 'calculated', 'using', 'the', 'method', 'you', 'already', 'use', 'to', 'calculate', 'your', 'applicable', 'taxes', 'if', 'you', 'don', 't', 'derive', 'profits', 'no', 'royalty', 'is', 'due', 'royalties', 'are', 'payable', 'to', 'project', 'gutenberg', 'literary', 'archive', 'foundation', 'the', 'days', 'following', 'each', 'date', 'you', 'prepare', 'or', 'were', 'legally', 'required', 'to', 'prepare', 'your', 'annual', 'or', 'equivalent', 'periodic', 'tax', 'return', 'please', 'contact', 'us', 'beforehand', 'to', 'let', 'us', 'know', 'your', 'plans', 'and', 'to', 'work', 'out', 'the', 'details'], ['what', 'if', 'you', 'want', 'to', 'send', 'money', 'even', 'if', 'you', 'don', 't', 'have', 'to', 'project', 'gutenberg', 'is', 'dedicated', 'to', 'increasing', 'the', 'number', 'of', 'public', 'domain', 'and', 'licensed', 'works', 'that', 'can', 'be', 'freely', 'distributed', 'in', 'machine', 'readable', 'form'], ['the', 'project', 'gratefully', 'accepts', 'contributions', 'of', 'money', 'time', 'public', 'domain', 'materials', 'or', 'royalty', 'free', 'copyright', 'licenses', 'money', 'should', 'be', 'paid', 'to', 'the', 'project', 'gutenberg', 'literary', 'archive', 'foundation'], ['if', 'you', 'are', 'interested', 'in', 'contributing', 'scanning', 'equipment', 'or', 'software', 'or', 'other', 'items', 'please', 'contact', 'michael', 'hart', 'at', 'hart', 'pobox', 'com'], ['portions', 'of', 'this', 'header', 'are', 'copyright', 'c', 'by', 'michael', 's', 'hart', 'and', 'may', 'be', 'reprinted', 'only', 'when', 'these', 'ebooks', 'are', 'free', 'of', 'all', 'fees', 'project', 'gutenberg', 'is', 'a', 'trademark', 'and', 'may', 'not', 'be', 'used', 'in', 'any', 'sales', 'of', 'project', 'gutenberg', 'ebooks', 'or', 'other', 'materials', 'be', 'they', 'hardware', 'or', 'software', 'or', 'any', 'other', 'related', 'product', 'without', 'express', 'permission'], ['end', 'the', 'small', 'print', 'for', 'public', 'domain', 'ebooks', 'ver', 'end']]
Explanation / Answer
NOTE->
You copy and paste the book list in your code.. as the length is exceeding here, i am not able to put this into my program here
print "Total number of list"
print len(book)
print " "
print "Total number of words"
count=0
for i1 in xrange(len(book)):
for i2 in xrange(len(book[i1])):
count=count+1
print "Total number of words in the list are "
print count
print " "
#largest paragraph in terms of number of words
print "paragraph having largest length is"
maxLength=max(len(l) for l in book)
for i1 in xrange(len(book)):
if len(book[i1])==maxLength:
print book[i1]
print " "
print "Most common words are "
from itertools import groupby as g
def most_common(L):
return max(g(sorted(L)), key=lambda(x, v):(len(list(v)),-L.index(x)))[0]
most_common(book)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.