Question: Design, code, and test a program in python that reads the text file below as an input file. ( First save this file to your

Design, code, and test a program in python that reads the text file below as an input file. (First save this file to your system, and put it in a folder where your program can find it or make sure you tell your program exactly where it can be found.)
As you process the file, do the following:
(1) Strip out all punctuation (including periods, apostrophes, quotation marks, commas, etc.).
(2) Count the number of 'C' and 'c' characters (keep a count for each).
(3) Count the number of 2-letter words.
(4) Count the total number of characters.
(5) Output the values you calculated in steps 2,3,4 above. Be sure to preface each value with info about what the number means (for example, "There are 24 lowercase b characters and 5 uppercase B characters.").
What is inside the text file(cr.txt):
I went to the crossroad, fell down on my knees
I went to the crossroad, fell down on my knees
Asked the Lord above, "Have mercy, now, save poor Bob if you please"
Ooh, standin' at the crossroad, tried to flag a ride
Ooh-ee, I tried to flag a ride
Didn't nobody seem to know me, babe, everybody pass me by
Standin' at the crossroad, baby, risin' sun goin' down
Standin' at the crossroad, baby, eee-eee, risin' sun goin' down
I believe to my soul, now, poor Bob is sinkin' down
You can run, you can run, tell my friend Willie Brown
You can run, you can run, tell my friend Willie Brown
That I got the crossroad blues this mornin', Lord, babe, I'm sinkin' down
And I went to the crossroad, mama, I looked east and west
I went to the crossroad, baby, I looked East and West
Lord, I didn't have no sweet woman, ooh well, babe, in my distress

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!