Challenge: Word Frequency Analyzer
Tâche
Swipe to start coding
Write a function that analyzes a given paragraph and returns a dictionary mapping each word to its frequency, ignoring case and punctuation.
- Split the input string into words, ignoring punctuation and treating uppercase and lowercase as the same.
- Count the occurrences of each word.
- Return a dictionary where each key is a word and each value is its frequency.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 3. Chapitre 7
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
Suggested prompts:
Can you explain this in simpler terms?
What are the main points I should remember?
Can you give me an example?
Génial!
Completion taux amélioré à 4.76
Challenge: Word Frequency Analyzer
Glissez pour afficher le menu
Tâche
Swipe to start coding
Write a function that analyzes a given paragraph and returns a dictionary mapping each word to its frequency, ignoring case and punctuation.
- Split the input string into words, ignoring punctuation and treating uppercase and lowercase as the same.
- Count the occurrences of each word.
- Return a dictionary where each key is a word and each value is its frequency.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 3. Chapitre 7
single