目录

小猪佩奇

蓝色玫瑰花

红色玫瑰花

小黄人


小猪佩奇

import turtle as t
t.pensize(4)
t.hideturtle()
t.colormode(255)
t.color((255, 155, 192), "pink")
t.setup(840, 500)
t.speed(20)
# 鼻子
t.pu()
t.goto(-100, 100)
t.pd()
t.seth(-30)
t.begin_fill()
a = 0.4
for i in range(120):if 0 <= i < 30 or 60 <= i < 90:a = a + 0.08t.lt(3)  # 向左转3度t.fd(a)  # 向前走a的步长else:a = a - 0.08t.lt(3)t.fd(a)
t.end_fill()
t.pu()
t.seth(90)
t.fd(25)
t.seth(0)
t.fd(10)
t.pd()
t.pencolor(255, 155, 192)
t.seth(10)
t.begin_fill()
t.circle(5)
t.color(160, 82, 45)
t.end_fill()
t.pu()
t.seth(0)
t.fd(20)
t.pd()
t.pencolor(255, 155, 192)
t.seth(10)
t.begin_fill()
t.circle(5)
t.color(160, 82, 45)
t.end_fill()
# 头
t.color((255, 155, 192), "pink")
t.pu()
t.seth(90)
t.fd(41)
t.seth(0)
t.fd(0)
t.pd()
t.begin_fill()
t.seth(180)
t.circle(300, -30)
t.circle(100, -60)
t.circle(80, -100)
t.circle(150, -20)
t.circle(60, -95)
t.seth(161)
t.circle(-300, 15)
t.pu()
t.goto(-100, 100)
t.pd()
t.seth(-30)
a = 0.4
for i in range(60):if 0 <= i < 30 or 60 <= i < 90:a = a + 0.08t.lt(3)  # 向左转3度t.fd(a)  # 向前走a的步长else:a = a - 0.08t.lt(3)t.fd(a)
t.end_fill()
# 耳朵
t.color((255, 155, 192), "pink")
t.pu()
t.seth(90)
t.fd(-7)
t.seth(0)
t.fd(70)
t.pd()
t.begin_fill()
t.seth(100)
t.circle(-50, 50)
t.circle(-10, 120)
t.circle(-50, 54)
t.end_fill()
t.pu()
t.seth(90)
t.fd(-12)
t.seth(0)
t.fd(30)
t.pd()
t.begin_fill()
t.seth(100)
t.circle(-50, 50)
t.circle(-10, 120)
t.circle(-50, 56)
t.end_fill()
# 眼睛
t.color((255, 155, 192), "white")
t.pu()
t.seth(90)
t.fd(-20)
t.seth(0)
t.fd(-95)
t.pd()
t.begin_fill()
t.circle(15)
t.end_fill()
t.color("black")
t.pu()
t.seth(90)
t.fd(12)
t.seth(0)
t.fd(-3)
t.pd()
t.begin_fill()
t.circle(3)
t.end_fill()
t.color((255, 155, 192), "white")
t.pu()
t.seth(90)
t.fd(-25)
t.seth(0)
t.fd(40)
t.pd()
t.begin_fill()
t.circle(15)
t.end_fill()
t.color("black")
t.pu()
t.seth(90)
t.fd(12)
t.seth(0)
t.fd(-3)
t.pd()
t.begin_fill()
t.circle(3)
t.end_fill()
# 腮
t.color((255, 155, 192))
t.pu()
t.seth(90)
t.fd(-95)
t.seth(0)
t.fd(65)
t.pd()
t.begin_fill()
t.circle(30)
t.end_fill()
# 嘴
t.color(239, 69, 19)
t.pu()
t.seth(90)
t.fd(15)
t.seth(0)
t.fd(-100)
t.pd()
t.seth(-80)
t.circle(30, 40)
t.circle(40, 80)
# 身体
t.color("red", (255, 99, 71))
t.pu()
t.seth(90)
t.fd(-20)
t.seth(0)
t.fd(-78)
t.pd()
t.begin_fill()
t.seth(-130)
t.circle(100, 10)
t.circle(300, 30)
t.seth(0)
t.fd(230)
t.seth(90)
t.circle(300, 30)
t.circle(100, 3)
t.color((255, 155, 192), (255, 100, 100))
t.seth(-135)
t.circle(-80, 63)
t.circle(-150, 24)
t.end_fill()
# 手
t.color((255, 155, 192))
t.pu()
t.seth(90)
t.fd(-40)
t.seth(0)
t.fd(-27)
t.pd()
t.seth(-160)
t.circle(300, 15)
t.pu()
t.seth(90)
t.fd(15)
t.seth(0)
t.fd(0)
t.pd()
t.seth(-10)
t.circle(-20, 90)
t.pu()
t.seth(90)
t.fd(30)
t.seth(0)
t.fd(237)
t.pd()
t.seth(-20)
t.circle(-300, 15)
t.pu()
t.seth(90)
t.fd(20)
t.seth(0)
t.fd(0)
t.pd()
t.seth(-170)
t.circle(20, 90)
# 脚
t.pensize(10)
t.color((240, 128, 128))
t.pu()
t.seth(90)
t.fd(-75)
t.seth(0)
t.fd(-180)
t.pd()
t.seth(-90)
t.fd(40)
t.seth(-180)
t.color("black")
t.pensize(15)
t.fd(20)
t.pensize(10)
t.color((240, 128, 128))
t.pu()
t.seth(90)
t.fd(40)
t.seth(0)
t.fd(90)
t.pd()
t.seth(-90)
t.fd(40)
t.seth(-180)
t.color("black")
t.pensize(15)
t.fd(20)
# 尾巴
t.pensize(4)
t.color((255, 155, 192))
t.pu()
t.seth(90)
t.fd(70)
t.seth(0)
t.fd(95)
t.pd()
t.seth(0)
t.circle(70, 20)
t.circle(10, 330)
t.circle(70, 30)
t.exitonclick()

蓝色玫瑰花

import turtleturtle.speed(5)
# 设置初始位置
turtle.penup()
turtle.goto(0, 200)
turtle.pendown()
# 花蕊
turtle.fillcolor("blue")
turtle.begin_fill()
turtle.circle(10, 180)
turtle.circle(25, 110)
turtle.left(50)
turtle.circle(60, 45)
turtle.circle(20, 170)
turtle.right(24)
turtle.fd(30)
turtle.left(10)
turtle.circle(30, 110)
turtle.fd(20)
turtle.left(40)
turtle.circle(90, 70)
turtle.circle(30, 150)
turtle.right(30)
turtle.fd(15)
turtle.circle(80, 90)
turtle.left(15)
turtle.fd(45)
turtle.right(165)
turtle.fd(20)
turtle.left(155)
turtle.circle(150, 80)
turtle.left(50)
turtle.circle(150, 90)
turtle.end_fill()# 花瓣1
turtle.left(150)
turtle.circle(-90, 70)
turtle.left(20)
turtle.circle(75, 105)
turtle.setheading(60)
turtle.circle(80, 98)
turtle.circle(-90, 40)# 花瓣2
turtle.left(180)
turtle.circle(90, 40)
turtle.circle(-80, 98)
turtle.setheading(-83)# 叶子1
turtle.fd(30)
turtle.left(90)
turtle.fd(25)
turtle.left(45)
turtle.fillcolor("green")
turtle.begin_fill()
turtle.circle(-80, 90)
turtle.right(90)
turtle.circle(-80, 90)
turtle.end_fill()turtle.right(135)
turtle.fd(60)
turtle.left(180)
turtle.fd(85)
turtle.left(90)
turtle.fd(80)# 叶子2
turtle.right(90)
turtle.right(45)
turtle.fillcolor("green")
turtle.begin_fill()
turtle.circle(80, 90)
turtle.left(90)
turtle.circle(80, 90)
turtle.end_fill()turtle.left(135)
turtle.fd(60)
turtle.left(180)
turtle.fd(60)
turtle.right(90)
turtle.circle(200, 60)
turtle.done()

红色玫瑰花

import turtleturtle.speed(5)# 设置初始位置turtle.penup()turtle.left(90)turtle.fd(200)turtle.pendown()turtle.right(90)
# 花蕊turtle.fillcolor("red")turtle.begin_fill()turtle.circle(10, 180)turtle.circle(25, 110)turtle.left(50)turtle.circle(60, 45)turtle.circle(20, 170)turtle.right(24)turtle.fd(30)turtle.left(10)turtle.circle(30, 110)turtle.fd(20)turtle.left(40)turtle.circle(90, 70)turtle.circle(30, 150)turtle.right(30)turtle.fd(15)turtle.circle(80, 90)turtle.left(15)turtle.fd(45)turtle.right(165)turtle.fd(20)turtle.left(155)turtle.circle(150, 80)turtle.left(50)turtle.circle(150, 90)turtle.end_fill()# 花瓣1turtle.left(150)turtle.circle(-90, 70)turtle.left(20)turtle.circle(75, 105)turtle.setheading(60)turtle.circle(80, 98)turtle.circle(-90, 40)# 花瓣2turtle.left(180)turtle.circle(90, 40)turtle.circle(-80, 98)turtle.setheading(-83)# 叶子1turtle.fd(30)turtle.left(90)turtle.fd(25)turtle.left(45)turtle.fillcolor("green")turtle.begin_fill()turtle.circle(-80, 90)turtle.right(90)turtle.circle(-80, 90)turtle.end_fill()turtle.right(135)turtle.fd(60)turtle.left(180)turtle.fd(85)turtle.left(90)turtle.fd(80)# 叶子2turtle.right(90)turtle.right(45)turtle.fillcolor("green")turtle.begin_fill()turtle.circle(80, 90)turtle.left(90)turtle.circle(80, 90)turtle.end_fill()turtle.left(135)turtle.fd(60)turtle.left(180)turtle.fd(60)turtle.right(90)turtle.circle(200, 60)

小黄人

import turtle as t
# t = turtle.Turtle()
wn = t.Screen()
t.colormode(255)
t.hideturtle()
t.speed(0)
t.penup()
t.pensize(4)
t.goto(100,0)
t.pendown()
t.left(90)
t.color((0,0,0),(255,255,0))
#身体绘制上色
t.begin_fill()
t.forward(200)
t.circle(100,180)
t.forward(200)
t.circle(100,180)
t.end_fill()
#右眼睛绘制上色
t.pensize(12)
t.penup()
t.goto(-100,200)
t.pendown()
t.right(100)
t.circle(500,23)
t.pensize(3)
t.penup()
t.goto(0,200)
t.pendown()
t.seth(270)
t.color("black","white")
t.begin_fill()
t.circle(30)
t.end_fill()
t.penup()
t.goto(15,200)
t.pendown()
t.color("black","black")
t.begin_fill()
t.circle(15)
t.end_fill()
t.penup()
t.goto(35,205)
t.color("black","white")
t.begin_fill()
t.circle(5)
t.end_fill()
#左眼睛绘制上色
t.pensize(3)
t.penup()
t.goto(0,200)
t.pendown()
t.seth(90)
t.color("black","white")
t.begin_fill()
t.circle(30)
t.end_fill()
t.penup()
t.goto(-15,200)
t.pendown()
t.color("black","black")
t.begin_fill()
t.circle(15)
t.end_fill()
t.penup()
t.goto(-35,205)
t.color("black","white")
t.begin_fill()
t.circle(5)
t.end_fill()
#嘴绘制上色
t.penup()
t.goto(-20,100)
t.pendown()
t.seth(270)
t.color("black","white")
t.begin_fill()
t.circle(20,180)
t.left(90)
t.forward(40)
t.end_fill()
#裤子绘制上色
t.penup()
t.goto(-100,0)
t.pendown()
t.seth(0)
t.color("black","blue")
t.begin_fill()
t.forward(20)
t.left(90)
t.forward(40)
t.right(90)
t.forward(160)
t.right(90)
t.forward(40)
t.left(90)
t.forward(20)
t.seth(270)
t.penup()
t.goto(-100,0)
t.circle(100,180)
t.end_fill()
#左裤子腰带
t.penup()
t.goto(-70,20)
t.pendown()
t.color("black","blue")
t.begin_fill()
t.seth(45)
t.forward(15)
t.left(90)
t.forward(60)
t.seth(270)
t.forward(15)
t.left(40)
t.forward(50)
t.end_fill()
t.left(180)
t.goto(-70,30)
t.dot()
#右裤腰带
t.penup()
t.goto(70,20)
t.pendown()
t.color("black","blue")
t.begin_fill()
t.seth(135)
t.forward(15)
t.right(90)
t.forward(60)
t.seth(270)
t.forward(15)
t.right(40)
t.forward(50)
t.end_fill()
t.left(180)
t.goto(70,30)
t.dot()
#脚
t.penup()
t.goto(4,-100)
t.pendown()
t.seth(270)
t.color("black","black")
t.begin_fill()
t.forward(30)
t.left(90)
t.forward(40)
t.seth(20)
t.circle(10,180)
t.circle(400,2)
t.seth(90)
t.forward(20)
t.goto(4,-100)
t.end_fill()
t.penup()
t.goto(-4,-100)
t.pendown()
t.seth(270)
t.color("black","black")
t.begin_fill()
t.forward(30)
t.right(90)
t.forward(40)
t.seth(20)
t.circle(10,-225)
t.circle(400,-3)
t.seth(90)
t.forward(21)
t.goto(-4,-100)
t.end_fill()
#左手
t.penup()
t.goto(-100,50)
t.pendown()
t.seth(225)
t.color("black","yellow")
t.begin_fill()
t.forward(40)
t.left(90)
t.forward(35)
t.seth(90)
t.forward(50)
t.end_fill()
#右手
t.penup()
t.goto(100,50)
t.pendown()
t.seth(315)
t.color("black","yellow")
t.begin_fill()
t.forward(40)
t.right(90)
t.forward(36)
t.seth(90)
t.forward(50)
t.end_fill()
#
t.penup()
t.goto(0,-100)
t.pendown()
t.forward(30)
#
t.penup()
t.goto(0,-20)
t.pendown()
t.color("yellow")
t.begin_fill()
t.seth(45)
t.forward(20)
t.circle(10,180)
t.right(90)
t.circle(10,180)
t.forward(20)
t.end_fill()
#
t.penup()
t.color("black")
t.goto(-100,-20)
t.pendown()
t.circle(30,90)
t.penup()
t.goto(100,-20)
t.pendown()
t.circle(30,-90)
#头顶
t.penup()
t.goto(2,300)
t.pendown()
t.begin_fill()
t.seth(135)
t.circle(100,40)
t.end_fill()
t.penup()
t.goto(2,300)
t.pendown()
t.begin_fill()
t.seth(45)
t.circle(100,40)
t.exitonclick()

【python】有趣的灵魂万里挑一,一波动图送给大家~~~相关推荐

  1. 有趣的灵魂万里挑一:从智能座舱看汽车进化史

    发明了T型轿车的亨利·福特,有一句广为流传的名言:"如果我最初问消费者想要什么,他们应该是会告诉我,'要一匹更快的马'." 今天,汽车向智能化.自动化演进已经是共识,但如何给消费者 ...

  2. 好看的皮囊千篇一律,有趣的灵魂万里挑一

    1.谁都会老,也都会死掉,真心希望最后的一天,你能够拍着胸脯说:"我从未做过的事情,就是不做:我一直做的事情,就是我活着的意义!"

  3. 普通的加载千篇一律,有趣的 loading 万里挑一

    前言 在网络速度较慢的场景,一个有趣的加载会提高用户的耐心和对 App 的好感,有些 loading 动效甚至会让用户有想弄清楚整个动效过程到底是怎么样的冲动.然而,大部分的 App的 loading ...

  4. 好看的皮囊千篇一律,有趣的书籍万里挑一,学习Java必读的两款书籍推荐

    今天给各位学习Java的小伙伴儿们推荐两本Java路线上必不可少的书籍,核心卷1和卷2,大家可根据自己的情况种草.正所谓,书多不压身. Java核心技术卷1 Java 诞生 27 年来,这本享誉全球的 ...

  5. 软文营销文案兼具有趣的灵魂才能形成广泛传播

    俗话说的好:好看的外表千篇一律,有趣的灵魂万里挑一.尽管这句俗语很多时候都是应用在人身上,但是它在软文的世界里同样适用.品牌在做软文营销的过程中,对于文案的要求很多时候都是一个关键词:有吸引力.文案作 ...

  6. 虚拟数字人遇上ChatGPT,好看的皮囊和有趣的灵魂?

    都说好看的皮囊千篇一律,有趣的灵魂万里挑一,博雅仔不禁好奇,到底有没有皮囊又好看,灵魂又有趣的人呢?二者能否得兼?答案是当然可以啊. 虽然在现实生活中,遇到这样的人需要静待缘分的安排,但是在网络上的一 ...

  7. 微信小程序万里目_4款万里挑一的微信小程序,每一个都是黑科技!

    阅读本文前,请您先点击上面的"电子荟",再点击"关注",这样您就可以继续免费收到文章了.每天都有分享,完全是免费订阅,请放心关注. 4款万里挑一的微信小程序,每 ...

  8. 投资理财-有趣的灵魂

    昨晚徒弟给我分享一个事,说他一个朋友投资有个习惯,只买四个.我一看这习惯和我一样,然后继续看就大跌眼镜了. 他说,这个朋友特别喜欢他老婆,每次买股票一定是四只,而且第一个字连起来一定是:"我 ...

  9. python搞笑代码-python有趣代码

    广告关闭 腾讯云11.11云上盛惠 ,精选热门产品助力上云,云服务器首年88元起,买的越多返的越多,最高返5000元! 前言本月将更新八篇python有趣系列文章. 本系列通过多个有趣案例,讲解pyt ...

最新文章

  1. 2022-2028年中国硅藻土产业发展态势及市场发展策略报告
  2. Java面试题及答案整理( 2022最新版,持续更新)
  3. 决策树(chap3)Machine Learning In Action学习笔记
  4. Python中定义函数的三种形式
  5. windbg学习-----n(Set Number base)
  6. JDBC查询Oracle全部表名称,如何使用JDBC API从Oracle数据库中的现有表中检索记录?...
  7. python控制灯_Python 控制树莓派 GPIO 输出:控制 LED 灯
  8. dataframe数据标准化处理_数据处理中的标准化、归一化究竟是什么?
  9. Kubernetes—StatefulSet部署有状态应用详解(二十四)
  10. linux /etc/profile文件,Linux 配置文件 /etc/profile
  11. 解决vscode卡顿,CPU占用过高的问题
  12. JS 浏览器差异(IE和FF)
  13. linux 读写信号量学习
  14. AVR单片机教程——DAC
  15. BIG5码转换为GB2312码的方法
  16. 蓝桥杯题库及答案python版_蓝桥杯试题库的历届真题版.doc
  17. 你竟然是这么神奇的 CSS
  18. 知识小结------数据分析------Cox比例风险回归模型(proportional hazards model)
  19. android t渐变立体按钮,Android 多色渐变按钮
  20. 三颗种子开发系统源码

热门文章

  1. Spring Web : 概念模型 HttpEntity
  2. 网页开发可以使用多种编程语言。以下是一些常用的编程语言及其优缺点
  3. 第024篇:ArcGIS中实现要素的自动编号
  4. 什么是移动电源?移动电源如何工作?
  5. 荣耀50到底咋样?冲就完了
  6. mysql 查看表v空间自增涨_面试问烂的 MySQL 查询优化,看完屌打面试官!
  7. 计算机大赛作品文本,全国创新杯说课大赛计算机应用基础类一等奖作品:毕业展示会策划文案的美化文本和段落的格式设置说课课件...
  8. MAC地址和IP地址是否缺一不可
  9. pix2pix 与 pix2pixHD的大致分析
  10. python functools partial_python标准库--functools.partial