用户:
柚子味儿的糖查看:4 回复:5 评论:4 创建时间:2020-08-17T13:51:59
——————————————————————————————————————————————————————————————————————————————————————————————————————————、

#黑色螺旋线
import turtle
t=turtle.Pen()
t.speed(100)
colors = ["red","yellow","blue","green"]
while 1==1:
answer=input("输入y表示绘制多彩螺旋线,输入n表示绘制非多彩,请输入:")
if answer=="y":
for i in range (0,200,1):
t.pencolor(colors[i % 4])
t.forward(i)
t.left(89)
我先写这么多,你们下面的自己试试哈
n的答案你们试试哈
我也刚学Python不久,不喜勿喷
下节课
柚子味儿的糖#黑色螺旋线
import turtle
t=turtle.Pen()
t.speed(100)
colors = ["red","yellow","blue","green"]
while 1==1:
answer=input("输入y表示绘制多彩螺旋线,输入n表示绘制非多彩,请输入:")
if answer=="y":
for i in range (0,200,1):
t.pen color(colors[i % 4])
t.forward(i)
t.left(89)
有缩进版
点赞0
评论