支持Python2,3

# coding =utf-8

#  打开pycharm直接运行,自带包无需下。

# coding=utf-8

import turtle 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.08

t.lt(3) # 向左转3度

t.fd(a) # 向前走a的步长

else:

a = a - 0.08

t.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.08

t.lt(3) # 向左转3度

t.fd(a) # 向前走a的步长

else:

a = a - 0.08

t.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画图小猪佩奇_python绘图 -- 小猪佩奇源码分享相关推荐

  1. 用python实现植物大战僵尸(游戏截图+动态演示+源码分享)

    大家好,我是梦执,对梦执着.希望能和大家共同进步! 下面给大家带来python实现植物大战僵尸的的源码分享,只含有冒险模式. 截图+动态演示+源码分享 游戏截图 动态演示 源码分享 state/too ...

  2. Python利用微软Azure免费的语音合成TTS源码分享

    我敢保证,用过微软的语音合成后,你就会发现这是世界上最好的语音合成软件.99.99%接近人声自然流程.语调也非常自然,结合其独特的sml标记语言,合成过程中可控制主播声色和音调,以及停顿等各种的内容. ...

  3. python财务管理系统_SSM个人财务管理系统,源码分享

    全微毕设擅长JAVA(SSM,SSH,SPRINGBOOT).PYTHON(DJANGO/FLASK).THINKPHP.C#.安卓.微信小程序.MYSQL.SQLSERVER等,欢迎咨询 每天记录学 ...

  4. python画图小实例_python绘图实例

    importmatplotlib.pyplot as pltimportnumpy as np values= [0.09,-0.05,0.20,-0.02,0.08,0.09,0.03,0.027] ...

  5. python微博爬虫代码_python 微博爬虫 示例源码(lxml)

    [实例简介]需要创建 D:/weibo/weibo_crawl.txt 文件,然后运行该示例即可 [实例截图] [核心代码] # -*- coding:utf-8 -*- ''' Created on ...

  6. Python控制AI虚拟主播说话聊天源码分享

    Python是非常简单可用的脚本语言,本次我们将介绍如何实用Python控制一个AI虚拟主播说话聊天.通过分析目前市场上可用的虚拟主播软件,发现Motionface是一个简单可用的虚拟主播软件,它提供 ...

  7. Python爬取英雄联盟官网壁纸源码分享

    import json import re import requests import time def getLOLImages(): header = {'User-Agent':'Mozill ...

  8. python基于爬虫技术的海量电影数据分析源码,数据处理分析可视化,GUI界面展示

    基于爬虫技术的海量电影数据分析 介绍 一个基于爬虫技术的海量电影数据分析系统 系统架构 本系统主要分为四个部分,分别为后端爬虫抓取.数据处理分析可视化.GUI界面展示.启动运行,分别对应getData ...

  9. Python基于YOLOv5的交通标志识别系统[源码]

    1.图片演示: 2.视频演示: [项目分享]Python基于YOLOv5的交通标志识别系统[源码&技术文档&部署视频&数据集]_哔哩哔哩_bilibili 3.标注好的数据集: ...

最新文章

  1. 在 5G 速度上,iPhone 12 只是个弟弟
  2. 看完JDK并发包源码的这个性能问题,我惊了!
  3. [LeetCode] Sum of Two Integers 两数之和
  4. 15.基于Hadoop的数据仓库Hive第2部分
  5. 社交平台舆情分析项目的总结和感想(LU学习,EM,KNN)(二)
  6. 总分 Score Inflation
  7. WORD2010自动编号后,目录那里编号和文字中间有很大的空格,怎么
  8. 0x0000050蓝屏srvsys_win7电脑蓝屏,显示的应该是srv.sys造成的,是什么情况?应该如何处理?...
  9. Apache详细介绍 - [ Apache v2.4.10 for Windows ]
  10. servlet中用out.print输出中文为“乱码”如何解决
  11. 信息学奥赛一本通(1014:与圆相关的计算)
  12. 王彪20162321 2016-2017-2 《程序设计与数据结构》第6周学习总结
  13. WEB前端性能优化常见方法
  14. 【应急响应】2020应急响应基础-Windows、Linux合集
  15. 商业智能BI推动制造业智能化转型
  16. html 自适应 音乐播放器,mmPlayer:一款基于Vue的自适应Web在线音乐播放器
  17. 推荐一个巨好用的查看gihub源码的插件-Octotree
  18. 佛祖保佑注释代码(内含神兽与美女)
  19. 车载网络技术——CAN总线基础
  20. JetPack知识点实战系列十一:MotionLayout让动画如此简单

热门文章

  1. 十八种让你有用的饲料配方
  2. 一物一码(6): 一物一码之【开展一物一码营销活动基本流程2,设计开发部署,生产包装,活动上线】
  3. 计算机u盘 硬盘无法读取,电脑无法识别usb设备,电脑无法识别u盘,移动硬盘解决方法汇总...
  4. springMVC开发过程中遇到的404错误的两种情况总结
  5. Artifact storage:war exploded: Error during artifact deployment. See server log for details 之一种解决方法
  6. 快速连WiFi,你只需一个二维码
  7. docker跨主机集群之flannel
  8. 不会深度学习怎么写人脸识别
  9. 矩阵乘法的并行化算法讨论
  10. Python数据分析箱线图