I have seen people in the Haram carrying their young children when they offer their prayers with the Imam. They put them down when they kneel for their prostration and pick them up again when they stand up. This causes a lot of movement in prayer, which according to some schools of thought renders the prayer invalid. Is this correct?

This is perfectly appropriate, because it ensures that the parent will not be distracted by the child running about during the prayer, and the child won’t cry if he feels neglected. The movement involved does not affect the validity of the prayer.

Suppose a snake appears in front of a person engaged in prayer. The worshipper is allowed to fight it until it is killed, or to change place so that he is not in danger. That this may involve several moves is perfectly understandable and acceptable.