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 x_length_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
- Python 3
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