+ 1
How I can output the letter frequency
You are making a program to analyze text. Take the text as the first input and a letter as the second input, and output the frequency of that letter in the text as a whole percentage. Sample Input: hello l Sample Output: 40
2 Antworten
+ 1
tekst = 'aman'
lett = 'n'
print((tekst.count(lett)*100)/len(tekst))
+ 1
Thanks