Quick actions

cmd+k|ctrl+k

Navigation

Languages

exercise 3 - lab 2- for

Snippet info

Language

Python

Visibility

public

Author

hccc19

Created

2016-10-14T10:15:14Z

Updated

2016-10-14T10:15:14Z

# exercise 3 - lab 2
s = 'Counts English Vowels and Consonants'
s = s.lower()
print(s)
countVowels = 0
countConsonants = 0
for str in s :
    if str in 'aoeiu':
        countVowels += 1
    if str in 'bcdfghjklmnpqrstvwxyz':
        countConsonants += 1
        
print("countVowels = %s countConsonants = %s" % (countVowels, countConsonants))
INFO