Please help me to use python write this question thanks Rece
Please help me to use python write this question, thanks.
Receive a data string and a single letter as input. Determine what percentage of the string is composed using the letter and return this as the output.Solution
def countLetters(word):
letterd={}
for letter in word:
letterd[letter] = 0
for letter in word:
letterd[letter] += 1
return letterd
