0

Can someone give the solution of longest word project

22nd Nov 2020, 8:36 AM
Entropy
Entropy - avatar
4 odpowiedzi
+ 3
An input is given as a text Find the longest word in the text and print it Like: "This is a Awesome text"
22nd Nov 2020, 8:43 AM
Entropy
Entropy - avatar
+ 3
Split the sentence to make a list of the words.. Assign the first word to a variable. Do a "for in" loop..(.start at sentence[1:]) compare the len of the variable to the len of the current word in the loop.. ..reassign the word as necessary. ..or Although ...I actually used the map function with a lambda then I used the max function and used that max in the index method on the split sentence....(i sound more complicated that it actually is)
22nd Nov 2020, 9:48 AM
rodwynnejones
rodwynnejones - avatar
+ 2
Post the complete Question.
22nd Nov 2020, 8:37 AM
Souptik Nath
Souptik Nath - avatar
0
Which programming language?
22nd Nov 2020, 8:44 AM
Souptik Nath
Souptik Nath - avatar