猫史档案馆


【Python作品分享】新的作品-18【作品秀】

用户:Microsoft啊Microsoft啊查看:0 回复:3 评论:0 创建时间:2024-01-30T11:49:43


【作品展示】

center_image

 

【作品介绍】

 

【作品源代码】

import turtle


myscreen = turtle.Screen()
myscreen.setup(700, 700)
t = turtle.Pen()
t.speed(-100)
t.pencolor('tan4')
t.left(90)
t.begin_fill()
t.fillcolor('tan1')
t.circle(180, 360)
t.end_fill()
t.penup()
t.forward(15)
t.pendown()
t.fillcolor('saddle brown')
t.begin_fill()
t.circle(180)
t.end_fill()
yes = myscreen.numinput('夹层选择','1.生菜 2.沙拉酱 3.其他.,4.番茄')


if yes == 1:
    color = 'light green'
elif yes == 2:
    color = 'light yellow'
    

else:
    color = 'tomato'


t.penup()
t.forward(15)
t.pendown()

t.fillcolor(color)
t.begin_fill()
t.circle(180)
t.end_fill()
turtle.done()

 

【提示】

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

https://python.codemao.cn


回复

上一页1 页 / 共 1下一页
飞熊jsrt飞熊jsrt

沙发捏

点赞0


评论


飞熊jsrt飞熊jsrt

嗨嗨嗨,板凳

点赞0


评论


飞熊jsrt飞熊jsrt

还是我,天花板

点赞0


评论