Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Please write the following program in Python 3. Also, please show all outputs. A file with a name like picture.jpg is said to have

1. Please write the following program in Python 3. Also, please show all outputs.

A file with a name like picture.jpg is said to have an extension of "jpg"; i.e. the extension of a file is the part of the file after the final period in its name. Write a program that takes as an argument the name of a directory (folder) and then finds the extension of each file. Then, for each extension found, it prints the number of files with that extension and the minimum, average, and maximum size for files with that extension in the selected directory.

Write a text analyzer. It should be in a form of a function that takes a file name as an argument. It should read and analyze a text file and then print:

the top 5 most frequently used words in the file

the number of times the top 5 words are used

should be sorted by most frequently used count

the longest word in the document

the average size of each word

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

Beginning ASP.NET 4.5 Databases

Authors: Sandeep Chanda, Damien Foggon

3rd Edition

1430243805, 978-1430243809

More Books

Students also viewed these Databases questions

Question

What changes, if any, are projected for this environment?

Answered: 1 week ago

Question

How have these groups changed within the last three years?

Answered: 1 week ago