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): # letter must be a string
       return "error"
   if (len(letter) != 1): # letter must only be a single character
       return "error"

    # return True if letter is a vowel (capital or lowercase)
   if (letter in ["a","e","i","o","u","y","A","E","I","O","U","Y"]):
       return True

   return False