summaryrefslogtreecommitdiff
path: root/wk6/pset/sentimental-readability/readability.py
blob: c8f4e556e9684141ac8fbfafaa988a16ac5fa661 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from cs50 import get_string

text = get_string("Text: ")

s = 0.0 # sentences
w = 1.0 # words
l = 0.0 # letters
c = ''

for i in range(len(text)):
    c = text[i]
    j = ord(c)
    if c == '.' or c == '!' or c == '?':
        s