Skip to content
Advertisement

Coleman Liau index formula just will not work

I’m writing readability in python for CS50, and I’ve tried so many different Coleman liau index formulas but it still will not work no matter what I do. My letter, word and sentence counters are giving me the correct output.

I’ve been trying for hours to the point where I just copied and pasted an algorithm I found still doesn’t work… and translating from C doesn’t work (from my old code) :/

JavaScript

Advertisement

Answer

The problem was my count_letters() function :/ . The and text[index] == ' ') == False was the problem

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement