有时孩子仅仅是需要比咱想象的更多一些的呵护

打印 被阅读次数

[阅读原文]

Sometimes Kids Just Need More Help

Angie finished her homework which was drawing the game board. Everything is good so she was provided her first challenge: centre the board horizontally on the blue canvas. She knew how to move the grid left and right, but couldn’t find the right formula that worked. Her best try got left margin the hardcoded value 200 which looked pretty good. However she seemed unable to move on with a solution.

I made a screenshot and pasted onto TextEdit, trying to explain further. With the width of canvas 736 and the width of the grid 320 marked up in red, Angie calculated with pencil and paper and got a = 208.

what should a be to put the grid in the middle horizontally?

“Where does your 208 come from, Angie?”, I asked. She typed the following.

(736 - 320) / 2

...

[阅读原文]

登录后才可评论.