Question: findwordofLength ( 2 5 points ) Write a function findwordoflength that locates the first word in a sentence that has the given length. Details: accepts

findwordofLength (25 points)
Write a function findwordoflength that locates the first word in a sentence that has the given
length. Details:
accepts two arguments:
the desired word length
a sentence ( str)
returns the location (index) of the first word in the sentence that has the desired length
for this problem, the first word has location/index 0, the second index 1, and so forth ...
(Python style counting/indexing)
the punctuation characters
should not be included in any word's length
-1 is returned if no word of the desired length is found
findwordofLength ( 2 5 points ) Write a function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!