Retired
Character Frequency (retired)
3,638 of 6,074MysteriousMagenta
Description:
Description
Welcome, Warrior! In this kata, you will get a message and you will need to get the frequency of each and every character!
Explanation
Your function will be called char_freq
/charFreq
/CharFreq
and you will get passed a string, you will then return a dictionary (object in JavaScript) with as keys the characters, and as values how many times that character is in the string. You can assume you will be given valid input.
Example
char_freq("I like cats") // Returns {'a': 1, ' ': 2, 'c': 1, 'e': 1, 'I': 1, 'k': 1, 'l': 1, 'i': 1, 's': 1, 't': 1}
Fundamentals
Strings
Similar Kata:
Stats:
Created | Dec 15, 2014 |
Warriors Trained | 8582 |
Total Skips | 205 |
Total Code Submissions | 13730 |
Total Times Completed | 6074 |
Python Completions | 3638 |
JavaScript Completions | 2163 |
C# Completions | 350 |
Total Stars | 126 |
% of votes with a positive feedback rating | 92% of 1024 |
Total "Very Satisfied" Votes | 891 |
Total "Somewhat Satisfied" Votes | 112 |
Total "Not Satisfied" Votes | 21 |