Challenge: Word Frequency Analyzer
Task
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
Everything was clear?
Thanks for your feedback!
SectionΒ 3. ChapterΒ 7
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 4.76
Challenge: Word Frequency Analyzer
Swipe to show menu
Task
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
Everything was clear?
Thanks for your feedback!
SectionΒ 3. ChapterΒ 7
single