Counting Vowels and Consonants

This script takes a user input and counts the number of vowels and consonants that it finds. It prints the results at the end. By matching the vowels and consonants to defined strings, we are able to filter out extra characters such as numbers and punctuation.

#Take an input from the user
query = input('Enter a word or phrase: ')  
#Initial Vowel Count
numVowels = 0  
#Initial Consonant Count
numCons = 0  
#Vowel Characters
charVowels = 'aeiou'  
#Consonant Characters
charConsonants = 'bcdfghjklmnpqrstvwxyz'

#Use For loop to iterate through each character
#in the query
for char in query:  
    #Check the character against the charVowels
    #string, if no match move on
    if char in charVowels:
        numVowels += 1
    #Check the character against the charConsonants
    #string, if no match move on
    elif char in charConsonants:
        numCons += 1
    #Else statement that continues the For loop with
    #the next query character

#Print number od Vowels
print('Number of Vowels is: ' + str(numVowels))  
#Print number of Consonants
print('Number of Consonants s: ' + str(numCons))