Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using PYTHON write a program that analyzes Charles Dickenss David Copperfield. Your program should scan the file copperfield.txt and provide per-chapter statistics for the total

Using PYTHON write a program that analyzes Charles Dickenss David Copperfield. Your program should scan the file copperfield.txt and provide per-chapter statistics for the total number of commas, total number of words and average word length. In addition to these statistics, your program should report the longest and shortest word in each chapter. You should also create a list of all words used in the chapter. Sort the list alphabetically and report the first 10 words in the list. Finally, your application should create a dictionary that stores a count for each word appearing in the chapter. Use this dictionary to report the frequency of the longest word and shortest word. Also, report the most commonly occurring word in each chapter.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

3rd Edition

0471418455, 978-0471418450

More Books

Students also viewed these Databases questions