[python]代码库from turtle import*

def nose(x,y):#鼻子

pu()

goto(x,y)

pd()

seth(-30)

begin_fill()

a=0.4

for i in range(120):

if 0<=i<30 or 60<=i<90:

a=a+0.08

lt(3) #向左转3度

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

else:

a=a-0.08

lt(3)

fd(a)

end_fill()

pu()

seth(90)

fd(25)

seth(0)

fd(10)

pd()

pencolor(255,155,192)

seth(10)

begin_fill()

circle(5)

color(160,82,45)

end_fill()

pu()

seth(0)

fd(20)

pd()

pencolor(255,155,192)

seth(10)

begin_fill()

circle(5)

color(160,82,45)

end_fill()

def head(x,y):#头

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

pu()

goto(x,y)

seth(0)

pd()

begin_fill()

seth(180)

circle(300,-30)

circle(100,-60)

circle(80,-100)

circle(150,-20)

circle(60,-95)

seth(161)

circle(-300,15)

pu()

goto(-100,100)

pd()

seth(-30)

a=0.4

for i in range(60):

if 0<=i<30 or 60<=i<90:

a=a+0.08

lt(3) #向左转3度

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

else:

a=a-0.08

lt(3)

fd(a)

end_fill()

def ears(x,y): #耳朵

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

pu()

goto(x,y)

pd()

begin_fill()

seth(100)

circle(-50,50)

circle(-10,120)

circle(-50,54)

end_fill()

pu()

seth(90)

fd(-12)

seth(0)

fd(30)

pd()

begin_fill()

seth(100)

circle(-50,50)

circle(-10,120)

circle(-50,56)

end_fill()

def eyes(x,y):#眼睛

color((255,155,192),"white")

pu()

seth(90)

fd(-20)

seth(0)

fd(-95)

pd()

begin_fill()

circle(15)

end_fill()

color("black")

pu()

seth(90)

fd(12)

seth(0)

fd(-3)

pd()

begin_fill()

circle(3)

end_fill()

color((255,155,192),"white")

pu()

seth(90)

fd(-25)

seth(0)

fd(40)

pd()

begin_fill()

circle(15)

end_fill()

color("black")

pu()

seth(90)

fd(12)

seth(0)

fd(-3)

pd()

begin_fill()

circle(3)

end_fill()

def cheek(x,y):#腮

color((255,155,192))

pu()

goto(x,y)

pd()

seth(0)

begin_fill()

circle(30)

end_fill()

def mouth(x,y): #嘴

color(239,69,19)

pu()

goto(x,y)

pd()

seth(-80)

circle(30,40)

circle(40,80)

def body(x,y):#身体

color("red",(255,99,71))

pu()

goto(x,y)

pd()

begin_fill()

seth(-130)

circle(100,10)

circle(300,30)

seth(0)

fd(230)

seth(90)

circle(300,30)

circle(100,3)

color((255,155,192),(255,100,100))

seth(-135)

circle(-80,63)

circle(-150,24)

end_fill()

def hands(x,y):#手

color((255,155,192))

pu()

goto(x,y)

pd()

seth(-160)

circle(300,15)

pu()

seth(90)

fd(15)

seth(0)

fd(0)

pd()

seth(-10)

circle(-20,90)

pu()

seth(90)

fd(30)

seth(0)

fd(237)

pd()

seth(-20)

circle(-300,15)

pu()

seth(90)

fd(20)

seth(0)

fd(0)

pd()

seth(-170)

circle(20,90)

def foot(x,y):#脚

pensize(10)

color((240,128,128))

pu()

goto(x,y)

pd()

seth(-90)

fd(40)

seth(-180)

color("black")

pensize(15)

fd(20)

pensize(10)

color((240,128,128))

pu()

seth(90)

fd(40)

seth(0)

fd(90)

pd()

seth(-90)

fd(40)

seth(-180)

color("black")

pensize(15)

fd(20)

def tail(x,y):#尾巴

pensize(4)

color((255,155,192))

pu()

goto(x,y)

pd()

seth(0)

circle(70,20)

circle(10,330)

circle(70,30)

def setting(): #参数设置

pensize(4)

hideturtle()

colormode(255)

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

setup(840,500)

speed(10)

def main():

setting() #画布、画笔设置

nose(-100,100) #鼻子

head(-69,167) #头

ears(0,160) #耳朵

eyes(0,140) #眼睛

cheek(80,10) #腮

mouth(-20,30) #嘴

body(-32,-8) #身体

hands(-56,-45) #手

foot(2,-177) #脚

tail(148,-155) #尾巴

done() #结束

main()

[源代码打包下载]

新建文件夹.zip(50积分)[20 次下载]

用python画佩奇_画佩奇 - python代码库 - 云代码相关推荐

  1. python代码时钟_时钟 - python代码库 - 云代码

    [python]代码库from turtle import * from datetime import * def Skip(step): #建立表的外框 penup() forward(step) ...

  2. python画图简单代码-简单画图 - python代码库 - 云代码

    [python]代码库#使用turtle库绘制图形 #画出 NUESOFT #导入turtle库 使用import + 模块名 as 相当于起一个别名 import turtle as t #设置画布 ...

  3. python语言表白源码-表白 - python代码库 - 云代码

    [python]代码库from turtle import * from time import sleep def go_to(x, y): up() goto(x, y) down() def b ...

  4. 画一个椭圆c语言程序,画椭圆 - c代码库 - 云代码

    [c]代码库#include #include #include #include int main ( void ) { /* request auto detection */ int gdriv ...

  5. 连连看java代码_连连看 - java代码库 - 云代码

    [java]代码库/* * To change this license header, choose License Headers in Project Properties. * To chan ...

  6. java代码雨_代码雨 - java代码库 - 云代码

    [java]代码库import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; ...

  7. java猜拳游戏代码_猜拳游戏 - java代码库 - 云代码

    [java]代码库public class Computer { String name; int score; public int showfist(){ int quan; quan=(int) ...

  8. java 登陆拦截_登录拦截 - java代码库 - 云代码

    [java]代码库package com.app.common; import org.apache.log4j.Logger; import com.app.model.User; import c ...

  9. java 挂机锁屏 源码_挂机界面 - java代码库 - 云代码

    [java]代码库//挂机 package com.view; import java.awt.Color; /** * 挂机界面 * @author Administrator * */ publi ...

最新文章

  1. leetcode算法题--调整数组顺序使奇数位于偶数前面
  2. tensorflow打印模型图_从Tensorflow模型文件中解析并显示网络结构图(pb模型篇)...
  3. parallels网络初始化失败_33 个神经网络「炼丹」技巧
  4. 双11节后“回血” 85后们来转转上“摆地摊”出售 闲置物品
  5. Redis基础(十三)——Jedis和Linux
  6. Mybatis根据IdType生成不同类型的主键id
  7. SQL数据旋转的问题
  8. 一文超详细讲解文本风格迁移
  9. 源码文件编码问题,导致编译的程序运行错误
  10. Javascript 特效大全
  11. 天堂2单机版服务器时间修改,如何制作最新L2J天堂2单机版源码服务端教程.doc
  12. FLTK中使用SDL的一种处理方式
  13. 数据库中的主键、超键、候选键、外键
  14. ATECLOUD智能云测试平台,中国人自己的“LABVIEW”-测试测量软件
  15. 线索二叉树的建立和遍历
  16. TypeError: empty() received an invalid combination of arguments 报错
  17. Matlab中的c2d函数用法
  18. Blazor在IoT领域的前端实践 @.NET开发者日
  19. 中国地热能产业需求预测与投资规划建议报告2022-2028年版
  20. 【Codeforces 1157F】 Maximum Balanced Circle | 思维、dp、二分

热门文章

  1. 如何使用时间序列数据去酿酒
  2. 如何查询手机是不是翻新机?2分钟看懂教程,学会可自查爱机
  3. android锁屏软件屏蔽状态栏下拉
  4. linux下apache端口被占用,【linux】下Apache无法启动(8080端口被占用)
  5. 记录Rocketmq定时消息不消费问题的排查过程
  6. 技术革新大趋势!一文带你读懂大数据分布式存储
  7. java mysql executequery_java - 无法使用executeQuery()发出数据操作语句
  8. 历时两年,近50篇干货,分享了多年MySQL经验,望大家在欢声笑语中精通MySQL!
  9. 鸽血红红宝石价格如何
  10. 台式计算机经常使用的硬盘是什么尺寸,台式硬盘寿命以工作小时计算一般是多少?怎么保养?移动硬盘上文件长期放着不动会不会破损?...