def isVowel(letter):
   """
   isVowel checks whether a given letter is a vowel.  For purposes of this
   function, treat y as always a vowel, w never as a vowel.
   letter should be a string containing a single letter
   return "error" if the value of the parameter is not a single letter string,
   return True, if the letter is a vowel, otherwise False
   """
              
   if type(letter)!=str or len(letter)!=1:
       return 'error'
   
   List=['a','e','i','o','u','y','A','E','I','O','U','Y']
   L=len(List)
   i=0
   if letter==List[i]:
       return True
   for i in range(0,L-1):
   
       if letter!=List[i]:
           i=i+1
           while letter==List[i]:
               
               return True
   else:
       return False