
上QQ阅读APP看本书,新人免费读10天
设备和账号都新为新人
3.7 发散思考
(a)如果把颜色列表改成其他颜色集,效果会怎样?
颜色集更改为colors=["blue","yellow","brown"]以后,运行程序的结果如图3-9所示。

图3-9 程序运行结果:更换颜色集后的图形
(b)如果把逆时针旋转角度改为其他值,效果会怎样?
在图3-7所示的程序中,把逆时针旋转角度改为122°,即left(122),运行程序的结果如图3-10所示。

图3-10 程序运行结果:更改逆时针旋转的角度为122°
在图3-7的程序中,把逆时针旋转角度改为118°,运行程序的结果如图3-11所示。

图3-11 程序运行结果:更改逆时针旋转的角度为118°
(c)把旋转方向改为顺时针,效果会怎样?
在图3-7的程序中,把旋转角度改为顺时针旋转122°,即right(122),运行程序的结果如图3-12所示。

图3-12 程序运行结果:更改顺时针旋转的角度为122°