We use time to draw gantt chart.But if we have been given effort in person months,then how can we draw gantt chart for it?
You need to turn the person-month into an planned month based on the number of people you have working the task. If a task is 10 person-months and you have five people, then the task would be two planned months. If you have 10, it would be one. If you have two, it would be five. Person-months/number of people.
In reality, doing this type of calculation would yield unreliable values. Each task has varying degrees of resource elasticity. Some tasks may have perfect elasticity where the above calculation would yield a good result and other tasks are perfectly inelastic where adding resources would have no effect on duration or might have an adverse effect and exacerbate the duration. And there are an infinite number of tasks with some degree between those two extremes.
But to answer your homework question, I suppose you would need to assume a perfectly elastic set of tasks.