用两种方法(普通方法和循环方法)绘制楼梯
'''
本期用turtle绘制个楼梯,先用最简单的方法绘制,之后在用循环绘制
'''
from turtle import *
pensize(5)
title('绘制楼梯')
color('blue')
forward(40)
left(90)
forward(40)
right(90)
forward(40)
left(90)
forward(40)
right(90)
forward(40)
left(90)
forward(40)
right(90)
forward(40)
from turtle import *
title('用循环绘制楼梯')
color('blue')
pensize(5)
for i in range(6):#几级台阶几个循环
forward(40)
left(90)
forward(40)
right(90)
江苏省启东市汇龙镇scratch、python上门一对一专业辅导,微信:double_sings(加好友请备注来意,谢谢)