猫史档案馆


【Python作品分享】youbing【求助帖】

用户:迷你禛迷你禛查看:0 回复:1 评论:0 创建时间:2021-03-28T15:48:52


【作品展示】

center_image

 

【作品介绍】

e1

 

【作品源代码】

from turtle import *
from random import *
color = ['darkorchid', 'blueviolet', 'purple', 'navy',
         'midnightblue', 'plum', 'fushisa']
color2 = ['aquamarine', 'springgreen', 'mediumsprintgreen',
          'palegreen', 'lawngreen', 'lightgreen', 'yellowgreen',
          'green']

t = Turtle()
t.speed(0)
t.penup()
for i in range(randint(100, 300)):
    t.penup()
    x = randint(-300, 300)
    y = randint(0, 200)
    t.goto(x, y)
    t.pensize(2)
    t.pendown()
    t.begin_fill()
    t.circle(y / 4, 360, 5)
    t.end_fill()


for i in range(randint(100, 1000)):
    t.penup()
    t.color(choice(color))
    x = randint(-300, 300)
    y = randint(-180, 100)
    t.goto(x, y)
    t.begin_fill()
    t.circle(y / 8)
    t.end_fill()
t.goto(-200, 0)
t.write('葡萄熟了', font=['微软雅黑', 50, 'bold'])

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 1下一页
迷你禛迷你禛

emotion_编程猫_嗨起来

点赞0


评论