Question: Question 1: (40%) Find out the longest sentence in the following paragraph: 111 text = Once upon a time there was an old mother

Question 1: ( (40 %) ) Find out the longest sentence in the following paragraph: text ( =11 ) Once upon a time there was 

Question 1: (40%) Find out the longest sentence in the following paragraph: 111 text = Once upon a time there was an old mother pig who had three little pigs and not enough food to feed them. So when they were old enough, she sent them out into the world to seek their fortunes. The first little pig was very lazy. He didn't want to work at all and he built his house out of straw. The second little pig worked a little bit harder but he was somewhat lazy too and he built his house out of sticks. Then, they sang and danced and played together the rest of the day. The third little pig worked hard all day and built his house with bricks. It was a sturdy house complete with a fine fireplace and chimney. It looked like it could withstand the strongest winds. The next day, a wolf happened to pass by the lane where the three little pigs lived; and he saw the straw house, and he smelled the pig inside. He thought the pig would make a mighty fine meal and his mouth began to water. max_len = 0 max_sentence = 11 11 # Insert your code below # End of your code print (f"The sentence: \"{max_sentence}\" is {max_len} character long")

Step by Step Solution

3.57 Rating (168 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To find the longest sentence in the text you need to split the text into sentences and then determin... View full answer

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 Operating System Questions!