In line following robot do this code work perfectly as iam unclear about the right and left moving programing lines
This depends on how the sensors are arranged. However, assuming they are setup like eyes on our heads, then the code would be correct. 

If the left sensor does not see the line, but the right sensor does, then that means the line is on the right side of the robot, and thus turning to the right would bring the line back into view of the left sensor.