Quotes help make search much faster. Example: "Practice Makes Perfect"

Saturday, November 24, 2012

Codecademy: "I'd like to buy a vowel"


#sample solution


pyg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha():
print original
word = original.lower()
first = word[0]
if first == "a" or first == "e" or first == "i" or first == "o" or first == "u":
  #print "vowel"
  new_word = word + pyg
  print new_word
  else:
  print "consonant"
else:
print 'empty'

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts