What does it mean by exactly one line of symmetry? 
When it says exactly one line of symmetry? Does it means the 2 shaded squares are symmetry? Or does it mean after the 2 shaded squares, the grid become symmetry.
Because I thought it just counts how many ways to shade 2 squares in a grid. 
Could someone explain the question and reason the answers?
I came up my own solution: https://github.com/kenpeter/shade_square, but not sure the correctness.
 A: The question is a little obscure, but hopefully this diagram will make it clear.

In each of the cases, the dashed orange line divides the entire figure (grid and colored squares) into two halves that are the mirror image of each other, across that line.  It is therefore a line of symmetry for that figure.  A little thought will show that for each figure, that orange line is unique.
Hint. In order to be symmetric for the entire figure, the line must cut the grid into two parts that are bilaterally symmetric in the way described above.  There aren't very many lines that can do that.  Figure out what they are, and decide how two squares can be colored to preserve that symmetry.
ETA: And as Andreas Blass notes in the comments, we must be careful to make sure that the two squares don't preserve two distinct lines of symmetry.  For instance, the upper left and lower right squares, if colored, yield two lines of symmetry: one from upper left to lower right, and a second one from upper right to lower left.
