Skip to content

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_.

Notifications You must be signed in to change notification settings

candytale55/Is_X_length_Py_3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Is_X_length_Py_3

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.

General info

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.

Description

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.

To-do list:

  • NA

Technologies

  • Python 3

Setup

NA - It's only coding examples, there's no setup.

Status

Project is: finished, - may come back and improve it, or not.

References

Based on Codecademy's Learn Python 3 course, Code Challenges: String Methods exercises

About

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_.

Topics

Resources

Stars

Watchers

Forks

Languages