+ 3
2 in 1 or exam?
ENG: The first code "01" splits a string into sentences. The second code "02" counts the number of words in the string. How to combine them to find the longest offer on the number of words (not number of characters)? RUS: Первый код "01" разбивает строку на предложения. Второй код "02" подсчитывает количество слов в строке. Как объединить их, чтобы найти самое длинное предложение по количеству слов? https://code.sololearn.com/cF3r1V34M5K4/?ref=app https://code.sololearn.com/c16QfvgEDD4k/?ref=app
4 Answers
+ 2
https://code.sololearn.com/cQyNPWIOuo41/?ref=app
Here you go.
+ 4
@Kinshuk Vasisht, For Expert...😂
THANK YOU!!!
+ 2
@Kinshuk Vasisht, My head is spinning goes... Tired of doing it and higher mathematics. Can you give the code? Then I'll study. Dates of exam pressure.
+ 1
You need to find the sentence with the largest number of words, right?
All you do is define two functions, wordcount() and split(), and check the wordcount() for each sentence returned by split() and print the one with the largest number of words.