title: Python Help - Loops
body: <p>I hope I may be able to get some help. The point of this program is that it is supposed to take a count of the vowels in a sentence given by the user. I cannot get it to increase the count and everything is staying at zero. I was hoping someone may be able to help show me where I may have messed up the code. It has to stay in a very similar format with the for loop iterating directly over the string. I've tried manipulating it so many different ways. If anyone is able to help I am posting a the code that I have. Thanks!</p>
  <pre><code>VOWELS = 'AEIOU'
  def count3(string, letter):
    count = 0
    # for loop only loops over index, don't initialize or incriminate index
    for char in string:
      #letters = string[char]
      letter_low = str.lower(letter)
      if char == letter_low:
        count = count + 1
    return (letter + &quot; : %d&quot; % count)
    # come back to this, not increasing count of each vowel
  
  def main():
    print(&quot;Enter a sentence and this sentence will display its vowel count.&quot;)
    sent = input(&quot;Enter the sentence to be analyzed:  &quot;)
    while sent:
      print(&quot;Your sentence was: &quot; + sent)
      sent_low = str.lower(sent)
      print(&quot;\nAnalysis&quot;)
  
    for letter in VOWELS:
      print(count3(sent_low, letter))
  </code></pre>