import random
import turtle # 导入名叫做海龟的工具包
length = 100 # 变量可以使用它存储的数字
colorline = 'blue' # 变量存储的字符串
turtle.color(colorline)
turtle.speed(0)
turtle.width(2)
for i in range(1,1000,2):
turtle.color(random.random(),random.random(),random.random())
turtle.fd(i)
turtle.left(123)
turtle.done()
Jason- drawing for loop
Guess you like
Origin blog.csdn.net/houlaos/article/details/102643741
Recommended
Ranking