#FindLongestWordLengthChallenge
Coding challenge - Return the length of the longest word in the provided sentence.
Your response should be a number.
e.g
findLongestWordLength("The quick brown fox jumped over the lazy dog") should return 6.
Coding challenge - Return the length of the longest word in the provided sentence.
Your response should be a number.
e.g
findLongestWordLength("The quick brown fox jumped over the lazy dog") should return 6.
Forwarded from Future Data Science(FDS)
#FindLongestWordLengthChallenge
Solution by @Abcdefghijklmnopqrstuvwxyz784629
def findLongestWordLength(name):
lis = name.split();
l = len(lis[0])
for i in lis:
if len(i) > l:
l = len(i)
return l;
print(findLongestWordLength("The quick brown fox jumped over the lazy dog"))
Solution by @Abcdefghijklmnopqrstuvwxyz784629
def findLongestWordLength(name):
lis = name.split();
l = len(lis[0])
for i in lis:
if len(i) > l:
l = len(i)
return l;
print(findLongestWordLength("The quick brown fox jumped over the lazy dog"))
Forwarded from Epython Lab (Asibeh Tenager)
#FindLongestWordLengthChallenge
Coding challenge - Return the length of the longest word in the provided sentence.
Your response should be a number.
e.g
findLongestWordLength("The quick brown fox jumped over the lazy dog") should return 6.
Coding challenge - Return the length of the longest word in the provided sentence.
Your response should be a number.
e.g
findLongestWordLength("The quick brown fox jumped over the lazy dog") should return 6.
👍2❤1
Forwarded from Future Data Science(FDS)
#FindLongestWordLengthChallenge
Solution by @Abcdefghijklmnopqrstuvwxyz784629
def findLongestWordLength(name):
lis = name.split();
l = len(lis[0])
for i in lis:
if len(i) > l:
l = len(i)
return l;
print(findLongestWordLength("The quick brown fox jumped over the lazy dog"))
Solution by @Abcdefghijklmnopqrstuvwxyz784629
def findLongestWordLength(name):
lis = name.split();
l = len(lis[0])
for i in lis:
if len(i) > l:
l = len(i)
return l;
print(findLongestWordLength("The quick brown fox jumped over the lazy dog"))
👍7