Question: (MUST BE IN PYTHON 2.7) storm.txt file content: It sounded as if the streets were running, And then the streets stood still. Eclipse was all

(MUST BE IN PYTHON 2.7)

(MUST BE IN PYTHON 2.7) storm.txt file content: It sounded as if

storm.txt file content:

It sounded as if the streets were running, And then the streets stood still. Eclipse was all we could see at the window, And awe was all we could feel.

By and by the boldest stole out of his covert, To see if time was there. Nature was in her beryl apron, Mixing fresher air.

Homework 13 There is a file named storm.txt available on Blackboard Copy the contents into the new file and save as "storm.txt' Print out the file Note the blank line between the verses Use a list to count the words in each line and to count the total number of words create an empty list Open the file for reading As you read the file line-by-line Split each line and store it in a list Don't store the empty line Hint: use a second list that stores each line one-by-one Check to see ofthe length is zero and use continue to avoid storing it as a length Determine the number of words in the line and append it to your list Use Python functions (explained earlier) to determine and display the following information: Print out the total number of words in the poem Print out the number of words in the longest line Print out the number of words in the shortest line

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!

Q:

25