猫史档案馆


【Python作品分享】月亮【去太空,趣编程】

用户:唯爱_青鸟唯爱_青鸟查看:0 回复:2 评论:0 创建时间:2021-05-02T22:30:08


【作品展示】

center_image

 

【作品介绍】

turtle.moon

 

【作品源代码】

import turtle
import random
import turtle as t
import random as r
turtle.bgcolor('black')
t.penup()
a = random.randint((-120), 120)
b = random.randint((-120), 120)
t.goto(0, (-200))
t.pendown()
t.fillcolor('gold')
t.begin_fill()
t.circle(200)
t.end_fill()
for i in range(12):
    t.penup()
    t.goto(a, b)
    t.pendown()
    a = random.randint((-120), 120)
    b = random.randint((-120), 120)
    t.circle(10)
print('moon')

 

【提示】

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

https://python.codemao.cn


回复

上一页1 页 / 共 1下一页
唯爱_青鸟唯爱_青鸟

emotion_编程猫_加油

点赞0


评论


唯爱_青鸟唯爱_青鸟

center_image

点赞0


评论