can somebody help me to do program it
Most people here regard help as you showing us what you've done, and asking for help on specifics which you can't get working. Looks to me like you're asking for a solution. Well I doubt if you're going to get a ready made solution from anyone.
Have you tried anything yet? Have you for example done the servo sweep or knob examples from the IDE?- File > Examples > Servo?
Have you decided what you want that snake thing to do? You don't (or shouldn't, anyway) just dive into coding until you've defined your requirements.
Define to yourself what you want, then try write the code, perhaps just for one servo. Get the basics working- and people will gladly help you with that I'm sure- then add more functionality and more servos.
EDIT... I guess there are some sensors involved too, like to see where it's going or whatever. If so, you'll need to investigate what those sensors are and figure out how to get their readings in. Then decide what effect those readings will have on your servo/s and see how to get a servo to react to an input.