Question 1: (40%) Find out the longest sentence in the following paragraph: 111 text = Once...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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") 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")
Expert Answer:
Answer rating: 100% (QA)
maxlen0 maxsentence function to find sentence of max length def findtxt split by comma senstxtsplit ... View the full answer
Related Book For
Posted Date:
Students also viewed these operating system questions
-
A boundary layer is formed on the surface of the aerofoil presented in Task 2, a) By assuming a complete turbulent flow around the wing, calculate I. The boundary layer thickness at the trailing edge...
-
Write codes for the following tasks and simulate them Q1. Initially 00000001 is placed at PORTB. Using external interrupts, implement circular left shift/right shift on port B, that is, whenever INTO...
-
Write codes for the following tasks and simulate them
-
Explain the economic basis for the U shape of the long-run average total cost curve.
-
Identify a situation where you would expect the first factor to have high loadings on all variables and to account for almost all the variance.
-
What are demand characteristics, and how do they limit the validity of the measurements obtained in a research study?
-
For testing H0 : 1 = 2 versus H1: 1 2, we observe s1 = 9.3, s2 = 2.1, n1 = 6, and n2 = 13. Test at the significance level = 0.05. a. Find the critical value. b. Do you reject H0?
-
Eddie Lander Tie Co. manufactures neckties and scarves. Two overhead application bases are used; some overhead is applied on the basis of raw material cost at a rate of 120% of material cost, and the...
-
Relating to a project about starting a commercial cleaning business, answer these questions: Why: What is the problem this project will solve? What is the purpose for it? Why is it important? When:...
-
Ten replicate analyses of the concentration of mercury in a sample of commercial gas condensate gave the following results: 23.3 22.5 21.9 21.5 19.9 21.3 21.7 23.8 22.6 24.7 ng ml1 Calculate: the...
-
A person exerts a force of 130 N at an angle of 36 degrees to the face of the door. The door has a width of 82 cm. Find the magnitude of the torque acting on the door.
-
Craig and Marc Kielburger are brothers and founders of the groups Free the Children and Leaders Today . Their book describes how they became involved with helping others on a large scale. They weave...
-
What are the key considerations in integrating hazard analysis with system safety engineering and risk management frameworks, such as ISO 31000 and ANSI/ASSP Z590.3? Discuss the synergies and...
-
What are some of the factors that determine health behaviors? Identify a health behavior that you struggle to perform? Which theory of health behavior change best relates to your inability to achieve...
-
The Conference Board Economic Forecast for the US Economy August 02, 2023 | Report The Conference Board forecasts that the growth seen in many parts of the economy will gradually buckle under...
-
What are Federal and State collaboration efforts for North Carolina? Discuss if NC participates in Health Information Security and Privacy Collaboration or do they plan on participating. Why is...
-
Management Decision Systems (MDS) is a management consulting firm that specialises in the development of mathematical models to help solve marketing- related problems. A team of consultants is...
-
Open Text Corporation provides a suite of business information software products. Exhibit 10-9 contains Note 10 from the companys 2013 annual report detailing long-term debt. Required: a. Open Text...
-
Maria Bockman, Bates & Hill Fabricators' accounts payable manager, has just received the company's direct materials purchases budget for the first quarter (see Exercise 5-15). The company makes all...
-
LowFare is a no-frills airline that provides daily shuttle service in the northeast United States. Passengers are predominantly businesspeople who travel between New York and Boston for the day....
-
At the end of 2013, Seiford Enterprises' Accounts Payable balance was $341,053; at the end of 2014, it was $160,094. Assume that the company purchased $1,951,523 of inventory during 2014 and that...
-
What are the main components of corporate directional strategies?
-
Define concept growth. What does this mean to entrepreneurial firms?
-
Discuss the significance of discounting in business decision making.
Study smarter with the SolutionInn App