码二代 > 新闻中心 > 新闻资讯 > 正文
新闻中心
最新发布
新闻资讯

女神节,一颗爱心送给妈妈|少儿编程网

作者: 来源:转载 日期:2023/3/8 10:11:45 0次阅读 评论:0
女神节,一颗爱心送给妈妈 中国少儿编程网   编程乐园     2023-03-08 09:24 直接上源码:
import turtle
import math
turtle.pen()
t=turtle
t.up()
t.goto(0,150)
t.down()
t.color('red')
t.begin_fill()
t.fillcolor('red')
t.speed(1)
t.left(45)
t.forward(150)
t.right(45)
t.forward(100)
t.right(45)
t.forward(100)
t.right(45)
t.forward(100)
t.right(45)
t.forward(250+math.sqrt(2)*100)
t.right (90)
t.speed(2)
t.forward(250+100*math.sqrt(2))
t.right(45)
t.forward(100)
t.right(45)
t.forward(100)
t.right(45)
t.forward(100)
t.right(45)
t.forward(150)
t.end_fill()
t.goto(-10,0)
t.pencolor('white')
t.pensize(10)
t.goto(-50,0)
t.goto(-50,80)
t.up ()
t.goto(-100,0)
t.down()
t.goto(-160,0)
t.goto(-130,0)
t.goto(-130,80)
t.goto(-160,80)
t.goto(-100,80)
t.up()
t.goto(10,25)
t.down()
t.right(45)
t.circle(25,extent=180)
t.goto(60,55)
t.circle(25,extent=180)
t.goto(10,25)
t.up()
t.goto(75,80)
t.down()
t.goto(100,0)
t.goto(125,80)
t.up()
t.goto(180,80)
t.down()
t.goto(140,80)
t.goto(140,0)
t.goto(180,0)
t.up()
t.goto(180,40)
t.down()
t.goto(140,40)
t.up()
t.goto(-40,-30)
t.down()
t.goto(-40,-80)
t.circle(40,extent=180)
t.goto(40,-30)
t.hideturtle()

文章内容属作者个人观点,不代表本站立场,如有侵权立删。


QQ行业群:202818485 434219048

微信公众号:kidscode_cn,二维码 

    标签:
    评论信息
    我要评论

    还没有找到合适的少儿编程培训机构?联系我们,帮您找 靠谱 的儿童学习编程机构,省事省力又省钱!

    小学编程公众号