Mothballs will not keep snakes away from your house or anywhere.
Whenever I placed mothballs where the snakes were coming around my house the snakes just slithered right over top of the moth balls so the mothballs do not keep snakes away.
There's is one known thing that does work that I've tried and it's called Snake Away snake repellent that can be bought at most any hardware store including Lowes, Home Depot or even Walmart.
I bought it at Lowes and it does work to get rid of snakes.
Just sprinkle the Snake Away where you want to keep snakes away and it will work.
I've also placed egg shells around the areas with success before I found out about the Snake Away.