I would use a water hose for this situation. I would bet that it's a Black Ratsnake, and I've had to remove these from underneath car hoods before. Of course, I don't mind one bit just picking one up, but often they get down next to the engine block where my hands won't reach without knocking loose some vital bit of hoses or wiring, but a good stream of cold water will make one drop down and take off. What you do NOT want to do is to start the engine; if the snake is next to the fan or belts, it will be killed, and not only that, but bits will be flung over the engine compartment and will quickly ROT, and that smell will be brought right inside your car, whether or not you have the air on! Decomposing flesh is not an odor that is easy to remove from the interior of a car, and it's a far cry from "New Car Smell", too! I know more than one person who had a snake get up inside the engine compartment, without the driver even knowing it, until they noticed that unmistable aroma, and removing rotting flesh from your engine compartment is no picnic. I've had to deal with a cat that got underneath the hood of my car once, and it's not something that I EVER want to go through again!
30+ years of catching snakes