+ 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

5th Jan 2018, 2:58 PM
Expert
Expert - avatar
4 Antworten
+ 2
https://code.sololearn.com/cQyNPWIOuo41/?ref=app Here you go.
5th Jan 2018, 3:51 PM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 4
@Kinshuk Vasisht, For Expert...😂 THANK YOU!!!
5th Jan 2018, 3:56 PM
Expert
Expert - avatar
+ 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.
5th Jan 2018, 3:35 PM
Expert
Expert - avatar
+ 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.
5th Jan 2018, 3:30 PM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar