猫史档案馆


【Python作品分享】第一个作品-(糖葫芦)【作品秀】

用户:杨谨赫杨谨赫查看:0 回复:1 评论:0 创建时间:2022-09-14T17:09:44


【作品展示】

center_image

 

【作品介绍】

看着不错

 

【作品源代码】

import turtle  
t = turtle.Pen()  
t.penup()  
t.goto(20, 0)  
t.pendown()  
t.begin_fill() 
t.fillcolor('red')  
t.circle(40)  
t.end_fill()  
t.penup()
t.goto(60, 40)
t.pendown()
t.begin_fill()
t.fillcolor('red')
t.circle(40)
t.end_fill()
t.penup()
t.goto(100, 80)
t.pendown()
t.begin_fill()
t.fillcolor('red')
t.circle(40)
t.end_fill()
t.penup()
t.goto(140,120)
t.pendown()
t.begin_fill()
t.fillcolor('red')
t.circle(40)
t.end_fill()
t.penup()
t.goto(180,160 )
t.pendown()
t.begin_fill()
t.fillcolor('red')
t.circle(40)
t.end_fill()
t.penup()
t.goto(220, 200)
t.pendown()
t.begin_fill()
t.fillcolor('red')
t.circle(40)
t.end_fill()
t.penup()
t.goto(260, 240)
t.pendown()
t.begin_fill()
t.fillcolor('red')
t.circle(40)
t.end_fill()
t.penup()
t.goto(300, 280)
t.pendown()
t.begin_fill()
t.fillcolor('red')
t.circle(40)
t.end_fill()
t.penup()
t.speed(1)
t.width(5)
t.color('red')
t.goto(-60, -40)

t.pendown()

t.seth(45)  # 45°角

t.forward(75)

turtle.done()

 

【提示】

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

https://python.codemao.cn


回复

上一页1 页 / 共 1下一页
疯狂的ren疯狂的ren

箭头咋回事center_image

点赞0


评论