Skip to main content

Text Stats Functions

Challenge on lesson: Checkpoint: Functions

Implement three functions over a sentence: word_count(text) (space-separated words, non-empty), longest_word(text) (first longest on ties), and contains_digit(text) (true if any character is a digit).

Difficulty: beginner

Back to lesson: Checkpoint: Functions