Is "by" a word? How about "cry? Fly? Fry? Is "rhythm" not a word?

Yes of course they are, however "y" is also what is known as an occasional vowel.

Or alternatively, a school teacher's excuse! :D
 
"The letter Y can be regarded as both a vowel and a consonant."

Oxford Dictionary
 

Similar threads