Kanchana,
You have be given many different ways on approaching your problem. All of them valid and workable. There is no direct magic code to perform what you want directly. If you wish to script such code that would require advance coding and gis knowledge. Using some else's, code does require you to install and download all required modules the code requires (You have been given this).
Searching Youtube I did find a lot of videos describing some of the techniques mention in this thread by other people... so maybe one of these video will help you?
List of videos describing how to covert a shapefile to KML:
convert shapefile to kml - YouTube