Sezione 1. Capitolo 6
single
Challenge: Word Counter
Scorri per mostrare il menu
Compito
Scorri per iniziare a programmare
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.
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 1. Capitolo 6
single
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione