猫史档案馆


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

用户:请设置名称_请设置名称_查看:0 回复:1 评论:0 创建时间:2021-05-02T01:11:33


【作品展示】

center_image

 

【作品介绍】

使用turtle库绘制,代码模式手打()。调用画笔得把手调废了。代码区有密密麻麻的_t_.结果颜色还是没调好()

作品不忍直视,自己都看不下去。只能靠留言水作品了(bmw)

不奢望给几等奖。重在参与(自我安慰),36强竟然有编程猫的手办,果然做大了就是跑不过商yh(反正没人看瞎讲几句----饶命())

总结:活人请别看这个作品

 

【作品源代码】

import turtle
# 导入海龟库
_t_ = turtle.Pen()
_t_.fillcolor('red')
_t_.pencolor('black')
_t_.pensize(5)
_t_.speed(0)

def cfx(x, y):

    _t_.begin_fill()
    _t_.forward(x)
    _t_.right(90)
    _t_.forward(y)
    _t_.right(90)
    _t_.forward(x)
    _t_.right(90)
    _t_.forward(y)
    _t_.end_fill()
def sjx(x, y):
    _t_.begin_fill()
    _t_.goto(x, y)
    _t_.goto((2 * x), 0)
    _t_.end_fill()
def pxsbx(x, y, z):
    _t_.penup()
    _t_.goto(x, y)
    _t_.left(z)
    _t_.pendown()
    for p in range(2):
        _t_.begin_fill()
        _t_.forward(30)
        _t_.left((180 - z))
        _t_.forward(50)
        _t_.left(z)
        _t_.end_fill()
    _t_.penup()
    _t_.goto(100, (-150))
    _t_.pendown()
    _t_.setheading((90 - z))
    for p in range(2):
        _t_.begin_fill()
        _t_.forward(30)
        _t_.right((180 - z))
        _t_.forward(50)
        _t_.right(z)
        _t_.end_fill()
cfx(100, 200)
sjx(50, 100)
_t_.fillcolor('blue')
pxsbx(0, (-150), 125)
turtle.done()

 

【提示】

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

https://python.codemao.cn


回复

上一页1 页 / 共 1下一页
XiangQinxi(邦邦BON)XiangQinxi(邦邦BON)

好像也不算密密麻麻,我就有点气,打了1个小时的50多行的代码,竟然发布不了,害的只能又做了一个程序

点赞0


评论