Skip to main content

Text Stats Functions

Challenge on lesson: Checkpoint: Functions

CHALLENGE
Difficulty: beginner+25 XP

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

Back to lesson: Checkpoint: Functions