Question: Write a program using python please it is an urgent exam in less than 1 hour plz Write a program for reading a text file

 Write a program using python please it is an urgent exam

Write a program using python please it is an urgent exam in less than 1 hour plz

Write a program for reading a text file composed of multiple lines and print all the triplets of adjacent words of the same length Words must be printed in uppercase. Punctuation marks should not be considered part of the words the file does not contain genitives (possessive) nor contractions, such as n't or 've. The program must handle possible problems during input/output. For example, given the file strawberry-short.txt No one I think is in my tree I mean it must be high or low That is you cannot, you know, tune in, but it is all right That is I think it is not too bad... Let me take you down, because I am going to Strawberry Fiels Nothing is real, and nothing to get hung about Strawberry Fields forever The output should be: ('IS', 'IN', 'MY') ("NOT', 'TOO', "BAD') ('100', 'BAD', 'LET') Please note that too and bad appear in two different triplets. While for the complete lyrics (file strawberry.txt), the output should be: ('EASY', 'WITH', 'EYES') ('ALL', 'YOU', SZE') ('IS', 'IN', 'MY') ('NOT', 'TOO', 'BAD') ('TOO', 'BAD', 'LET') ('IT', 'IS', 'ME')

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!