Skip to content

Instantly share code, notes, and snippets.

@uncletomiwa
Created October 27, 2013 18:50
Show Gist options
  • Save uncletomiwa/7186385 to your computer and use it in GitHub Desktop.
Save uncletomiwa/7186385 to your computer and use it in GitHub Desktop.
This helps you check if the first letter is a consonant or a vowel
vowels = ['a', 'e', 'i', 'o', 'u']
word = raw_input('Enter a word:')
try:
word = word.lower()
is_vowel = word[0] in vowels
if (is_vowel):
print("Vowel")
else:
print("Consonant")
except:
print "something was wrond with the word you entered"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment