+ 1
I didn't understand that code
for char in "abcdefghijklmnopqrstuvwxyz": perc = 100 * count_char(text, char) / len(text) print("{0} - {1}%".format(char, round(perc, 2)))
3 odpowiedzi
+ 7
How should you?
It is not complete.
+ 5
This code gives an error. Are you sure you have given the full code?
Please give the full code and follow this:
https://www.sololearn.com/post/75089/?ref=app
+ 4
Ahmed Jezi ,
as Oma Falk already mentioned: the code seems to be incomplete.
▪︎variable <text> is used but not declared and initialized
▪︎a function count_char() is called but it was never defined
further issues may also occur.
so please put the complete code in playground and link it here.
thanks!