0

Hi guys, can someone help me in this code why is it not working properly ?

text = input() letter = input() frequency = ((len(letter))/(len(text)))*100 print(int(frequency))

13th Apr 2022, 11:55 AM
Liwaa Bou Hamdan
Liwaa Bou Hamdan - avatar
2 Respuestas
+ 1
text.count(letter)/len(text)*100
13th Apr 2022, 6:15 PM
Oma Falk
Oma Falk - avatar
+ 1
If you are find a letter frequency in word text then len(letter) is 1 only... Whats your idea there? edit: for any input, it is 1/len(text) *100 hope you can correct it..
13th Apr 2022, 11:57 AM
Jayakrishna 🇮🇳