Number 2 Pencils

I live in NYC, and in all the tests that are marked by machines, you are required to use a #2 pencil. Why?? What exactly is so special about a #2 pencil, and what’s the difference between all the other kinds of pencils?

#2 just is a rating of the hardness of the lead. Hard lead is less susceptible to smearing but makes a fainter line. A soft lead puts down a darker line, but is more easily smeared. #2 just happens to be a good balance between line darkness and smearability. There is nothing magical about it, you could use any kind of lead to fill in a scan-tron as long as you are careful to make the squares dark enough for the reader to pick up your marks.