Question: Write only the Python program for this problem. Title of a story. Editor of a magazine wants to put an attractive title for a story

 Write only the Python program for this problem. Title of a

Write only the Python program for this problem. Title of a story. Editor of a magazine wants to put an attractive title for a story to be published in it. As a first test, the title must satisfy the following rules. . It should have less than 100 characters. It should not have more than 10 words. Number of long words (ie, with more than 10 characters) is less than or equal to 2. Write a Python program which takes a sentence as input and prints whether the sentence passes the first test to be a title of a story. Help for you: Use string operations and methods. You need to break the string into words and store them into a list. Find the length of this list and check with limit for number of words: Then loop around this list and count the number of words with length more than 10. In the output print the following: . . . Number of characters including spaces Criteria 1: Satisfied / Not satisfied Number of words Criteria 2: Satisfied / Not satisfied Number of long words Criteria 3: Satisfied / Not satisfied Test result: Passed / Failed . . Example: Input Trees are cut indiscriminately by the electricity department Output Number of characters including spaces): 60 Criteria 1: Satisfied Number of words: 8 Critena 2. Satisfied Number of long words: 2 Criteria 3: Satisfied Test result Passed

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!