用户:
热情的巨叶龙qN_S查看:0 回复:0 评论:0 创建时间:2022-04-23T10:50:31
【作品展示】

【作品介绍】
画图
【作品源代码】
import turtle
import random
import time
__Pen = turtle.Pen()
#开始进入Python的世界
__Pen.speed(int(input('速度?')))
t = int(input('角度?'))
for __count in range(int(input('次数?'))):
__Pen.circle(30, steps=5)
__Pen.right(t)
q = random.randint(1, 10)
if (q == 1):
__Pen.pencolor("#ff0000")
elif (q == 2):
__Pen.pencolor("#ff9900")
elif (q == 3):
__Pen.pencolor("#ffcc66")
elif (q == 4):
__Pen.pencolor("#ffff00")
elif (q == 5):
__Pen.pencolor("#33ff33")
elif (q == 6):
__Pen.pencolor("#66cccc")
elif (q == 7):
__Pen.pencolor("#000000")
elif (q == 8):
__Pen.pencolor("#6666cc")
elif (q == 9):
__Pen.pencolor("#00cccc")
else:
__Pen.pencolor("#cc66cc")
time.sleep(5)
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn