首页 > 编程知识 正文

python四瓣花朵图形,用python画一朵玫瑰代码

时间:2023-05-03 21:33:54 阅读:129922 作者:3079

刚开始学Python,画玫瑰花练手,正好今天也是情人节

我还以为很漂亮,觉得比我找到的几幅画强

代码如下

importturtleastt.setup (1100,1000 ) t.hideturtle (t.speed ) 11 ) t.pen up (t.goto ) 50, -450 ) t.pensize(5) t.pencolor('black ' ) t.Seth (140 ) t.pendown ) ) t.speed (10 ) t.circle )-450, 60 ) t.FD(100 )焦杜80 # 1yet.seth ) 10 ) t.FD ) 50 ) t.fillcolor('green ' ) t.begin_fill ) ) t.right 80 ) t.end_fill(t.seth ll(t.right ) 40 ) t.circle ) 120,80 ) t.left ) 100 ) t.circle ) 120, 80 ) t.end_fill(t.seth(160 ) t.FD ) 90 ) t.speed ) 11 ) t.penup ) ) t.FD )-140 ) t.seth ) 80 ) t.peth 70 ) t.seth ) 179 ) t.circle ) 223,76 ) t.end_fill(#2bant.speed ) 11 ) t.fillcolor('red ' ) t.begin _ 11 15 ) 55t.left(70 ) 125t.circle ) 200,70 ) t.seth(-80 ) t.circle (-170,40 ) t.circle ) 124,94 ) t.circle 40 ) t.pendown ) t.speed ) 10 ) t.seth(-60 ) t.circle ) 175,70 ) t.seth ) 235 ) t.ccle 60 ) t.seth(70 ) t 27 ) t.seth(60 ) t.FD(-8 ) t.speed (11 ) t.penup ) ) t.left (20.8 ) t.FD(-250.5 ) #3bant.pendown ) t.circle (-140,85 ) t.circle ) 100,70 ) t.right ) 165 ) t.circle (-200,32 ) t.speed ) 11 ) t.Seth (-100

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。