Function takes a string named _sentence_ and an integer named _x_ as parameters. It returns _True_ if every word in sentence has a length greater than or equal to _x_.
Function takes a string named sentence and an integer named x as parameters. It returns True if every word in sentence has a length greater than or equal to x.
The purpose of the project is just personal learning. I save this code as I may revisit this code in the future to find different solutions or to apply it under other context.
Function xlength_words takes a string named _sentence and an integer named x as parameters.
First it splits the sentence to get each word as a separate entity, in a list named splited_sentence, and then compares each word’s length with x. If it is less than x it will return False.
It returns True if every word in sentence has a length greater than or equal to x.
NA - It’s only coding examples, there’s no setup.
Project is: finished, - may come back and improve it, or not.
Based on Codecademy’s Learn Python 3 course, Code Challenges: String Methods exercises