#!/usr/bin/env python2#coding=utf-8

importturtle as t

t.pensize(4)

t.hideturtle()

t.colormode(255)

t.color((255,155,192),"pink")

t.setup(840,500)

t.speed(10)#鼻子

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)

python turtle画熊猫人_Python 使用turtle插件,画小猪佩奇相关推荐

  1. python用正方形画圆_Python 用turtle实现用正方形画圆的例子

    最近发现一个很有意思的画图的python库,叫做turtle,这里先说下用turtle这个库来实现用正方形画圆的思路. 每次都用乌龟(turtle) 来画出一个正方形,然后通过旋转3°后,继续画一样的 ...

  2. python画国际象棋_python使用turtle绘制国际象棋棋盘

    本文实例为大家分享了python使用turtle画国际象棋棋盘的具体代码,供大家参考,具体内容如下 使用的方法是每一个小格每一个小格的画 import turtle for i in range(8) ...

  3. python绘制蚊香形_python之turtle画蚊香

    原理:利用turtle绘制圆形,并使圆半径逐步增加 代码如下: import turtle turtle.pensize(30) for i in range(30): turtle.circle(i ...

  4. python turtle什么意思_python的turtle模块可以画什么

    python的turtle模块可以画什么 发布时间:2020-08-24 16:10:57 来源:亿速云 阅读:79 python的turtle模块可以画什么?很多新手对此不是很清楚,为了帮助大家解决 ...

  5. 用python画小人_python之turtle库画会眨眼的小人

    一 简介 turtle是python一个作图库,里面有很多方法.本文使用的方法如下: turtle.penup():画笔抬起 turtle.goto(x,y):画笔到哪里开始 turtle.pendo ...

  6. python绘制爱心气球_python中用turtle画爱心表白-Go语言中文社区

    python中用turtle画爱心表白 运行后的效果图: 下面的代码是在python3.7写的,代码有点长,但却语法简单易懂 代码如下: import turtle str = input('请输入表 ...

  7. python画国际象棋_python用turtle画国际象棋棋盘

    用turtle画的国际象棋棋盘 import turtle turtle.speed(10) a = 30 #画背景 turtle.up() turtle.goto( -10, -10) turtle ...

  8. python类似turtle的库_Python库——turtle

    Python的强大在于简单的结构和一系列强大的库,今天分享一个绘制图形的库--turtle 我们先看两个可以用turtle库实现的图形 这些都是利用turtle中的语句写出来的,接下来作者将为大家介绍 ...

  9. python中的turtle如何运行_python中turtle库的简单使用教程

    python的turtle库的简单使用 Python的turtle库是一个直观有趣的图形绘制函数库,是python的标准库之一. 一.绘图坐标体系 turtle库绘制图形的基本框架:通过一个小海龟在坐 ...

最新文章

  1. mysql语句将日期转换为时间戳的方法
  2. 使用网盘搭建svn服务器详解步骤
  3. angular-cli更新(link方式安装)
  4. JOE is on TV! CodeForces - 1293B(数学)
  5. swift3.0 post Json解析
  6. java虚拟机_一文彻底读懂Java虚拟机!(JVM)
  7. 动态规划——莱文斯坦距离
  8. 摩托罗拉edge S30冠军版再次开售:512GB超大存储 1GB不到5元钱!
  9. Bailian4003 十六进制转十进制【十六进制】
  10. python coroutine测试
  11. 录屏软件——大黄蜂,rar压缩包,解压后直接安装使用即可
  12. thinkphp6 +阿里云短信验证码
  13. 机械键盘cherry常见轴科普 --By Cheng
  14. 038 Divisible Subsequences
  15. ANSYS有限元仿真分析:边界非线性 (接触Contact)
  16. C#_____找错误
  17. Spring Boot Web应用程序中注册 Servlet 的方法实例
  18. App上传GooglePlay后,微信登录及Facebook登录异常
  19. Redis进阶-发布订阅简介
  20. tomcat配置用户权限

热门文章

  1. WCF系列之什么是WCF
  2. mysqldump 导入导出数据
  3. UVA10570 Meeting with Aliens【数学计算】
  4. Bailian4122 切割回文【DP】
  5. UVA12602 Nice Licence Plates【进制】
  6. UVA11219 How old are you?【日期】
  7. CCF201412-1 门禁系统(100分)
  8. vmware tools 的安装(Read-only file system 的解决)
  9. word 的使用(六)—— 常用功能
  10. vim 打开特殊文件—— 目录以及压缩包