Section 1. Chapitre 6
single
Challenge: Word Counter
Glissez pour afficher le menu
Tâche
Glissez pour commencer à coder
Write a function that counts how many times a specific word appears in a sentence.
- Receive a
sentenceand awordas arguments. - Count the number of times
wordappears insentencewhen splitting the sentence into words by whitespace. - Return the count as an integer.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 6
single
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion