counting letters in a text file in python
<p>So I'm trying to do this problem </p>

<p>Write a program that reads a file named text.txt and prints the following to the
screen:</p>

<p> The number of characters in that file</p>

<p> The number of letters in that file</p>

<p> The number of uppercase letters in that file</p>

<p> The number of vowels in that file</p>

<p>I have gotten this so far but I am stuck on step 2 this is what I got so far.</p>

<pre><code>file = open('text.txt', 'r')
lineC = 0
chC = 0
lowC = 0
vowC = 0
capsC = 0
for line in file:
    for ch in line:
        words = line.split()
        lineC += 1
        chC += len(ch)
for letters in file:
        for ch in line:
print("Charcter Count = " + str(chC))
print("Letter Count = " + str(num))
</code></pre>