In [25]:
def counting():
    print "Please enter an string and will count the vowels: "
    x=raw_input()
    vow=['a', 'e', 'i', 'o', 'u']
    count=0
    a=0
    e=0
    i=0
    o=0
    u=0
    for qw in x:
        if qw in vow:
            count += 1
            if qw == 'a':
                a += 1
            elif qw == 'e':
                e += 1
            elif qw == 'i':
                i += 1
            elif qw == 'o':
                o += 1
            elif qw == 'u':
                u += 1
            
            
        else:
            pass
    print "Have found %s vowels in the text" %count
    print "found %s a" %a
    print "found %s e" %e
    print "found %s i" %i
    print "found %s o" %o
    print "found %s u" %u

In [26]:
counting()


Please enter an string and will count the vowels: 
Checks if the string entered by the user is a palindrome. That is that it reads the same forwards as backwards like “racecar”
Have found 35 vowels in the text
found 12 a
found 13 e
found 7 i
found 2 o
found 1 u

In [ ]: