猫史档案馆


【Python作品分享】【去太空·趣编程】

用户:温翎皓Cdm温翎皓Cdm查看:0 回复:0 评论:0 创建时间:2021-05-04T19:09:11


【作品展示】

center_image

 

【作品介绍】

这是我参加【去太空·趣编程】的作品

 

【作品源代码】

# 如果画图界面太小,可以使用第三方软件(例如:pycharm,边玩边学)查看!
import turtle
import time
turtle.speed(0)
def china():
    turtle.up()
    turtle.goto(-200,200)
    turtle.down()
    turtle.begin_fill()
    turtle.fillcolor("red")
    turtle.pencolor("red")
    for i in range(2):
        turtle.forward(280)
        turtle.right(90)
        turtle.forward(200)
        turtle.right(90)
    turtle.end_fill()
    turtle.up()
    turtle.goto(-170,145)
    turtle.down()
    turtle.begin_fill()
    turtle.fillcolor("yellow")
    turtle.pencolor("yellow")
    for x in range(5):
        turtle.forward(50)
        turtle.right(144)
    turtle.end_fill()
    turtle.up()
    turtle.goto(-100,180)
    turtle.down()
    turtle.begin_fill()
    turtle.fillcolor("yellow")
    turtle.pencolor("yellow")
    for x in range(5):
        turtle.forward(20)
        turtle.right(144)
    turtle.end_fill()
    turtle.up()
    turtle.goto(-70,160)
    turtle.down()
    turtle.begin_fill()
    turtle.fillcolor("yellow")
    turtle.pencolor("yellow")
    for x in range(5):
        turtle.forward(20)
        turtle.right(144)
    turtle.end_fill()
    turtle.up()
    turtle.goto(-70,120)
    turtle.down()
    turtle.begin_fill()
    turtle.fillcolor("yellow")
    turtle.pencolor("yellow")
    for x in range(5):
        turtle.forward(20)
        turtle.right(144)
    turtle.end_fill()
    turtle.up()
    turtle.goto(-100,100)
    turtle.down()
    turtle.begin_fill()
    turtle.fillcolor("yellow")
    turtle.pencolor("yellow")
    for x in range(5):
        turtle.forward(20)
        turtle.right(144)
    turtle.end_fill()
    turtle.hideturtle()
turtle.penup()
turtle.goto(200,200)
turtle.pendown()
turtle.color('red')
turtle.fillcolor("red")
turtle.begin_fill()
turtle.left(50)
turtle.forward(50)
turtle.right(190)
turtle.forward(40)
turtle.right(160)
turtle.forward(40)
turtle.left(150)
turtle.forward(40)
turtle.right(110)
turtle.forward(40)
turtle.left(160)
turtle.forward(40)
turtle.right(150)
turtle.forward(40)
turtle.left(150)
turtle.forward(40)
turtle.right(110)
turtle.forward(40)
turtle.left(150)
turtle.forward(40)
turtle.right(150)
turtle.forward(40)
turtle.left(160)
turtle.forward(50)
turtle.left(55)
turtle.forward(50)
turtle.end_fill()
turtle.forward(20)
turtle.left(90)
turtle.forward(5)
turtle.left(-90)
turtle.left(180)
turtle.color('black')
turtle.fillcolor("white")
turtle.begin_fill()
turtle.right(270)
turtle.forward(100)
turtle.right(45)
turtle.forward(50)
turtle.right(90)
turtle.forward(50)
turtle.right(45)
turtle.forward(100)
turtle.right(90)
turtle.forward(70)
turtle.end_fill()
turtle.penup()
turtle.right(5)
china()
turtle.penup()
turtle.goto(-100,-100)
turtle.pendown()
turtle.color("black")
turtle.write('【去太空·趣编程】', font = ('宋体', 24, 'italic'))
time.sleep(1)

 

【提示】

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

https://python.codemao.cn


回复

上一页1 页 / 共 0下一页