今天无意间看到一个小猪佩奇的电视,心血来潮就写了一个小猪佩奇的python的代码,非常有意思,喜欢的朋友点个赞哈

附源码和图片效果

# coding=utf-8import turtle as tt.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写一个小猪佩奇相关推荐

  1. python量化股票源码_使用Python写一个量化股票提醒系统

    大家在没有阅读本文之前先看下python的基本概念, Python是一种解释型.面向对象.动态数据类型的高级程序设计语言. Python由Guido van Rossum于1989年底发明,第一个公开 ...

  2. python版植物大战僵尸源码_用Python写一个植物大战僵尸! 简直一模一样!

    引入需要的模块 import pygame import random 配置图片地址 IMAGE_PATH = 'imgs/' 设置页面宽高 scrrr_width = 800 scrrr_heigh ...

  3. 用python写聊天机器人_用Python 写一个机器人陪你聊天(文尾有彩蛋)

    工作一忙,原来秉烛夜谈的好友现在都很少聊天,微信都成了微信群的天下,鲜有微信好友给你发消息,想要主动发却也找不到开题话题,怎么办?用Python写一个机器人陪自己聊聊天吧.以下是源码及解析,小白都看得 ...

  4. python俄罗斯方块小游戏实验报告,童年的记忆——如何用python写一个俄罗斯方块小游戏!...

    谈到记忆里的小游戏,俄罗斯方块是大家一定会想到的一款游戏,自己写出来的应该玩起来更有感觉,然后就写了一个俄罗斯方块的游戏 给大家分享一下这个游戏的源码 先用python创建一个py文件 定义这次程序所 ...

  5. 用python做一个简单的游戏,用python写一个小游戏

    大家好,本文将围绕如何用python做一个简单的小游戏展开说明,python编写的入门简单小游戏是一个很多人都想弄明白的事情,想搞清楚用python做一个简单的游戏需要先了解以下几个事情. 1.Pyt ...

  6. python写一个地球同步卫星图动态壁纸(第三部分)

    -------------------------------- 前序: 系统:Windows 10 IDE:PyCharm Python:3.7.4 python写一个地球同步卫星图动态壁纸(第一部 ...

  7. 用Python写一个命令行火车票查看器

    Linux编程点击右侧关注,免费入门到精通! 作者丨protream https://www.jianshu.com/p/f411d7e10c41 当你想查询一下火车票信息的时候,你还在上12306官 ...

  8. 用Python 写一个机器人陪你聊天(文尾有彩蛋)

    工作一忙,原来秉烛夜谈的好友现在都很少聊天,微信都成了微信群的天下,鲜有微信好友给你发消息,想要主动发却也找不到开题话题,怎么办?用Python写一个机器人陪自己聊聊天吧.以下是源码及解析,小白都看得 ...

  9. 用Python写一个营销号垃圾视频生成器

    用Python写一个营销号垃圾视频生成器 可能是闲着太无聊,然而复习是不可能复习的,就做了一个这个玩意儿,改天进军UC和百家号(不会真有人用吧) 先看看效果:(1:20以后) 用Python做的营销号 ...

最新文章

  1. 广东深圳计算机学校排名2015年,2015年深圳小学综合排名 各区小学最新排名
  2. 时钟,复位和电源管理
  3. Tomcat服务器server.xml详解
  4. Curator: ZooKeeper的使用配方
  5. python怎么安装包-安装python第三方包
  6. 手机的基本功能测试---情景模式
  7. 1000多首无损歌曲合集
  8. OpenCASCADE:Modeling Algorithms模块之制作原语Making Primitives
  9. Ajax,再生还是幻灭---好文推荐
  10. diveintopython3 official_Python 学习资料整理
  11. 前端手动封装数组的foreach,map,filter,every,some,Reduce,reduceRight方法
  12. VLAN 路由实验图解
  13. oracle10.2.0.4 dbca,在rhel5上oracle 10.2.0.4 上dbca silent删除数据库
  14. SQL Server 中字符串中包含字符串变量的表示方法
  15. 路由子系统之fib相关结构体
  16. 房地产中介管理系统【JAVA版本】
  17. 计算机开机只显示,电脑开机黑屏只显示光标怎么办?来看看几种原因分析及解决方法!...
  18. wpf实现类似word文档的标尺功能
  19. 人工智能时代最吃香的热门专业,男女都适合
  20. 首届大连国际樱花节将启幕

热门文章

  1. 再次遇到ORA-04030的错误
  2. 08_EMS项目之需求分析与界面搭建
  3. ElasticSearch入门:ES分词器与自定义分词器
  4. 穿越NAT的SDWAN技术实现(上)
  5. 特斯拉新董事长:在我看来马斯克发推特很明智
  6. Django配置连接SqlServer(版本Django3.2.5,python3.9)
  7. 由一份诊断报告引发的思考
  8. 数据结构课程设计(魔王语言(c语言)的简单代码)
  9. show status. oracle,oracle命令lsnrctl status详细介绍
  10. 如何使用Mock进行单元测试