My function is not returning the expected value
<p>When I run the program, the function <code>percentagefreq</code> returns "none". </p>

<p>What am I doing wrong?</p>

<pre><code>def main():
    file = raw_input("Please enter name of file: ")
    s = readfile(file)
    print
    print "The file contains:"
    print s
    lc = tolowercase(s)
    print "The file in lowercase is:"
    print lc
    print
    compressedTxt = nospaces(lc)
    print "The alphabetic characters alone are:"
    print compressedTxt
    print
    Count = alpha(lc)  
    nonchr = len(s) - Count
    print "The number of alphabetic characters are: ", Count
    print "The number of non-alphabetic charcters are: ", nonchr
    print
    print "Letter\tFrequency\tPercentage"
    countFreq(compressedTxt)
    percent = percentagefreq(Count)
    print percent


def readfile(file):
    text = open(file,"r")
    s = text.read()
    text.close()
    return s

def tolowercase(s):
    lc = ""
    for x in s:
        if "A" &lt;= x &lt;= "Z":
            lc = lc + chr(ord(x) + 32)
        else:
            lc = lc + x
    return lc

def nospaces(lc):
    compressedTxt = ""
    for x in lc:
        if "a" &lt;= x &lt;= "z":
            compressedTxt = compressedTxt + x

    return compressedTxt


def alpha(lc):
    Count = 0
    for x in lc:
        if "a" &lt;= x &lt;= "z":
            Count = Count + 1
    return Count


def countFreq(compressedTxt):
    global freq
    freq = ""
    az = ('abcdefghijklmnopqrstuvwxyz')
    for x in az:
        freq = compressedTxt.count(x)
        print x, "\t", freq,"\t"

def percentagefreq(Count):
    for i in range(freq):
        percent = i/Count
        return percent

#I am trying to calculate the percentage of each letter appearing in a file of text

main()
</code></pre>
