项目作者: candytale55

项目描述 :
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_.
高级语言: Python
项目地址: git://github.com/candytale55/Is_X_length_Py_3.git
创建时间: 2021-01-27T09:53:11Z
项目社区:https://github.com/candytale55/Is_X_length_Py_3

开源协议:

下载


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

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