Skip to content

Instantly share code, notes, and snippets.

@ishan1608
Created September 26, 2014 08:26
Show Gist options
  • Save ishan1608/8880afb599fa5f80125d to your computer and use it in GitHub Desktop.
Save ishan1608/8880afb599fa5f80125d to your computer and use it in GitHub Desktop.
A simple vowel counter in python 2
def numberOfVowels(word):
counter = 0
for letter in word:
if (letter == 'a' or letter == 'e' or letter == 'i' or letter == 'o' or letter == 'u'):
counter += 1
return counter
print numberOfVowels('testing')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment