Python玫瑰花绘制「建议收藏」

Python玫瑰花绘制「建议收藏」刚开始学Python,画个玫瑰花练练手,正好今天也是情人节我自认为还是挺好看的,感觉比我搜到的那几个画出来的强代码如下importturtleastt.setup(1100,1000)t.hideturtle()t.speed(11)t.penup()t.goto(50,-450)t.pensize(5)t.pencolor("black")t.seth(140)t…

大家好,又见面了,我是你们的朋友全栈君。

刚开始学Python,画个玫瑰花练练手,正好今天也是情人节
在这里插入图片描述
我自认为还是挺好看的,感觉比我搜到的那几个画出来的强
代码如下

import turtle as t
t.setup(1100,1000)
t.hideturtle()
t.speed(11)
t.penup()
t.goto(50,-450)
t.pensize(5)
t.pencolor("black")
t.seth(140)
t.pendown()
t.speed(10)
t.circle(-300,60)
t.fd(100)
#jiaodu80
#1ye
t.seth(10)
t.fd(50)
t.fillcolor("green")
t.begin_fill()
t.right(40)
t.circle(120,80)
t.left(100)
t.circle(120,80)
t.end_fill()
t.seth(10)
t.fd(90)
t.speed(11)
t.penup()
t.fd(-140)
t.seth(80)
#2ye
t.pendown()
t.speed(10)
t.fd(70)
t.seth(160)
t.fd(50)
t.fillcolor("green")
t.begin_fill()
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.pendown()
t.speed(10)
#
t.fd(100)
#1ban
t.seth(-20)
t.fillcolor("crimson")
t.begin_fill()
t.circle(100,100)
t.circle(-110,70)
t.seth(179)
t.circle(223,76)
t.end_fill()
#2ban
t.speed(11)
t.fillcolor("red")
t.begin_fill()

t.left(180)
t.circle(-223,60)
t.seth(70)
t.speed(10)
t.circle(-213,15)#55
t.left(70)#125
t.circle(200,70)
t.seth(-80)
t.circle(-170,40)
t.circle(124,94)
t.end_fill()
#
t.speed(11)
t.penup()
t.right(180)
t.circle(-124,94)
t.circle(170,40)
t.pendown()
t.speed(10)

t.seth(-60)
t.circle(175,70)

t.seth(235)
t.circle(300,12)
t.right(180)
t.circle(-300,12)

t.seth(125)
t.circle(150,60)

t.seth(70)
t.fd(-20)
t.fd(20)

t.seth(-45)
t.circle(150,40)
t.seth(66)
t.fd(-18.5)
t.fd(18.5)

t.seth(140)
t.circle(150,27)
t.seth(60)
t.fd(-8)

t.speed(11)
t.penup()
t.left(20.8)
t.fd(-250.5)

#3ban

t.pendown()
t.speed(10)
t.fillcolor("crimson")
t.begin_fill()
t.seth(160)

t.circle(-140,85)
t.circle(100,70)
t.right(165)
t.circle(-200,32)
t.speed(11)
t.seth(-105)
t.circle(-170,14.5)
t.circle(123,94)
t.end_fill()

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/125399.html原文链接:https://javaforall.net

(0)
上一篇 2022年4月18日 下午10:00
下一篇 2022年4月18日 下午10:20


相关推荐

  • Manus:中国 SaaS 的新出路?

    Manus:中国 SaaS 的新出路?

    2026年3月15日
    2
  • cnetos6.4搭建tomcat7

    cnetos6.4搭建tomcat7

    2021年8月30日
    54
  • Linux安装redis和redis安装常见错误

    Linux安装redis和redis安装常见错误

    2021年11月23日
    42
  • 大四 Java开发实习近一年 记录(每6至12月更新一次)

    大四 Java开发实习近一年 记录(每6至12月更新一次)17年7月4号是我实习生入职的日子,因为是校企合作,所以没有面试、老师推荐、直接入职。刚来北京第一个感觉就是人多,还有就是热。刚到公司第一天,部门经理安排了我的mentor,他也是我的项目经理,安排座位之后给他我发了一些项目文档,让我先熟悉一下项目,然后给我发了几个常用工具的安装包,最重要的就是IDEA,之前在学校一直用MyEclipse,用了IDEA之后感觉确实不错,界面很漂亮。…

    2022年7月15日
    21
  • Apache Thrift的简单使用

    Apache Thrift的简单使用

    2021年12月7日
    51
  • GIT版本控制(详解)

    GIT版本控制(详解)简述桌面右键菜单 GitBash 命令 GitBash 常用命令流简述 Git 是分布式版本控制系统 那么它就没有中央服务器的 每个人电脑就是一个完整的版本库 这样 工作的时候就不需要联网了 因为版本都是在自己的电脑上 既然每个人的电脑都有一个完整的版本库 那多个人如何协作呢 比如自己在电脑上改变了文件 A 其他人也在电脑上改了文件 A 这时 这时 你们俩之间只需要把各自的修改推送给对方 就可以互相看到对方的修改了 桌面右键菜单 GitBash Unix 与 Linux 风格的命令行 使用最多 推荐最多

    2026年3月16日
    3

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号