#-*- coding: utf-8 -*-

"""Created on Sat Nov 10 22:02:32 2018

@author: 10029"""

importturtle#区域

defmy_goto(x, y):

turtle.penup()

turtle.goto(x, y)

turtle.pendown()defeyes():

turtle.tracer(False)

a= 2.5

for i in range(120):if 0 <= i < 30 or 60 <= i < 90:

a-= 0.05turtle.lt(3)

turtle.fd(a)else:

a+= 0.05turtle.lt(3)

turtle.fd(a)

turtle.tracer(True)#头

turtle.pensize(3)

turtle.penup()

turtle.circle(150, 40)

turtle.pendown()

turtle.fillcolor('#00a0de')

turtle.begin_fill()

turtle.circle(150, 280)

turtle.end_fill()#围巾

turtle.fillcolor('#e70010')

turtle.begin_fill()

turtle.seth(0)

turtle.fd(200)

turtle.circle(-5, 90)

turtle.fd(10)

turtle.circle(-5, 90)

turtle.fd(207)

turtle.circle(-5, 90)

turtle.fd(10)

turtle.circle(-5, 90)

turtle.end_fill()#脸

turtle.fd(183)

turtle.fillcolor('#ffffff')

turtle.begin_fill()

turtle.lt(45)

turtle.circle(120, 100)

turtle.seth(90)

eyes()

turtle.seth(180)

turtle.penup()

turtle.fd(60)

turtle.pendown()

turtle.seth(90)

eyes()

turtle.penup()

turtle.seth(180)

turtle.fd(64)

turtle.pendown()

turtle.seth(215)

turtle.circle(120, 100)

turtle.end_fill()#鼻子

my_goto(-10, 158)

turtle.fillcolor('#e70010')

turtle.begin_fill()

turtle.circle(20)

turtle.end_fill()#嘴巴

my_goto(5, 148)

turtle.seth(270)

turtle.fd(100)

turtle.seth(0)

turtle.circle(120, 50)

turtle.seth(230)

turtle.circle(-120, 100)#胡须

my_goto(-37, 135)

turtle.seth(165)

turtle.fd(60)

my_goto(-37, 125)

turtle.seth(180)

turtle.fd(60)

my_goto(-37, 115)

turtle.seth(193)

turtle.fd(60)

my_goto(37, 135)

turtle.seth(15)

turtle.fd(60)

my_goto(37, 125)

turtle.seth(0)

turtle.fd(60)

my_goto(37, 115)

turtle.seth(-13)

turtle.fd(60)

my_goto(0, 0)

turtle.seth(0)

turtle.penup()

turtle.circle(150, 50)

turtle.pendown()

turtle.seth(30)

turtle.fd(40)

turtle.seth(70)

turtle.circle(-30, 270)

turtle.fillcolor('#00a0de')

turtle.begin_fill()

turtle.seth(230)

turtle.fd(80)

turtle.seth(90)

turtle.circle(1000, 1)

turtle.seth(-89)

turtle.circle(-1000, 10)

turtle.seth(180)

turtle.fd(70)

turtle.seth(90)

turtle.circle(30, 180)

turtle.seth(180)

turtle.fd(70)

turtle.seth(100)

turtle.circle(-1000, 9)

turtle.seth(-86)

turtle.circle(1000, 2)

turtle.seth(230)

turtle.fd(40)

turtle.circle(-30, 230)

turtle.seth(45)

turtle.fd(81)

turtle.seth(0)

turtle.fd(203)

turtle.circle(5, 90)

turtle.fd(10)

turtle.circle(5, 90)

turtle.fd(7)

turtle.seth(40)

turtle.circle(150, 10)

turtle.seth(30)

turtle.fd(40)

turtle.end_fill()#左手

turtle.seth(70)

turtle.fillcolor('#ffffff')

turtle.begin_fill()

turtle.circle(-30)

turtle.end_fill()#右手

my_goto(-133.97, -91.81)

turtle.seth(50)

turtle.fillcolor('#ffffff')

turtle.begin_fill()

turtle.circle(30)

turtle.end_fill()#脚

my_goto(103.74, -182.59)

turtle.seth(0)

turtle.fillcolor('#ffffff')

turtle.begin_fill()

turtle.fd(15)

turtle.circle(-15, 180)

turtle.fd(90)

turtle.circle(-15, 180)

turtle.fd(10)

turtle.end_fill()

my_goto(-96.26, -182.59)

turtle.seth(180)

turtle.fillcolor('#ffffff')

turtle.begin_fill()

turtle.fd(15)

turtle.circle(15, 180)

turtle.fd(90)

turtle.circle(15, 180)

turtle.fd(10)

turtle.end_fill()#口袋

my_goto(-103.42, 15.09)

turtle.seth(0)

turtle.fd(38)

turtle.seth(230)

turtle.begin_fill()

turtle.circle(90, 260)

turtle.end_fill()

my_goto(5, -40)

turtle.seth(0)

turtle.fd(70)

turtle.seth(-90)

turtle.circle(-70, 180)

turtle.seth(0)

turtle.fd(70)#铃铛

my_goto(-103.42, 15.09)

turtle.fd(90)

turtle.seth(70)

turtle.fillcolor('#ffd200')

turtle.begin_fill()

turtle.circle(-20)

turtle.end_fill()

turtle.seth(170)

turtle.fillcolor('#ffd200')

turtle.begin_fill()

turtle.circle(-2, 180)

turtle.seth(10)

turtle.circle(-100, 22)

turtle.circle(-2, 180)

turtle.seth(180-10)

turtle.circle(100, 22)

turtle.end_fill()

turtle.goto(-13.42, 15.09)

turtle.seth(250)

turtle.circle(20, 110)

turtle.seth(90)

turtle.fd(15)

turtle.dot(10)

my_goto(0,-150)#眼睛

turtle.seth(0)

my_goto(-20, 195)

turtle.fillcolor('#000000')

turtle.begin_fill()

turtle.circle(13)

turtle.end_fill()

turtle.pensize(6)

my_goto(20, 205)

turtle.seth(75)

turtle.circle(-10, 150)

turtle.pensize(3)

my_goto(-17, 200)

turtle.seth(0)

turtle.fillcolor('#ffffff')

turtle.begin_fill()

turtle.circle(5)

turtle.end_fill()

my_goto(0, 0)

turtle.exitonclick()

python画图哆啦a梦-Python小白绘图 哆唻A梦 turtle真的很强大!相关推荐

  1. Python画图示例(4) 3D绘图

    Python画图示例(1) 一维数据集绘图 Python画图示例(2) 二维数据集绘图 Python画图示例(3) 其他绘图样式,散点图,直方图等 Python画图示例(4) 3D绘图 import ...

  2. python画图程序有图-python画图程序

    广告关闭 腾讯云11.11云上盛惠 ,精选热门产品助力上云,云服务器首年88元起,买的越多返的越多,最高返5000元! 今天做的是用python实现画图,画出你想要的图案,只要你的想象力足够丰富,以及 ...

  3. 为什么用python画图_怎么用python画图

    对于刚刚学习编程的同学来说对编程是非常陌生的,对很多的代码也是非常陌生,高中忙于学习的我们甚至可以说是对编程是一无所知,进入大学进入到这个专业才开始接触很多电脑相关的东西才开始接触编程,下面我就教大家 ...

  4. python画图模块_学习python画图模块plotnine:第一步安装

    官网链接 https://plotnine.readthedocs.io/en/stable/index.html 知乎介绍的文章 https://zhuanlan.zhihu.com/p/47814 ...

  5. python画图哆啦a梦-Python—turtle画图(哆啦A梦)

    [知识延伸] 在Python中有一个名为turtle的工具,也可以称他为画图工具,这是一种Python所独有的工具.是他为我们所包装好的模块,在这里 [要求] 今天我们利用turtle画图来绘制一个哆 ...

  6. python画图哆啦a梦大作业_Python—turtle画图(哆啦A梦)

    [知识延伸] 在Python中有一个名为turtle的工具,也可以称他为画图工具,这是一种Python所独有的工具.是他为我们所包装好的模块,在这里 [要求] 今天我们利用turtle画图来绘制一个哆 ...

  7. python画图哆啦a梦-使用Python的Turtle绘制哆啦A梦实例

    这是我几年前为了练习python的turtle库而画的,今天翻出了代码,分享给大家. 这是我初学python时画的,当时还没有面向对象的概念,也没有采取类方法之类,纯原始手工,供大家参考. 若有兴趣可 ...

  8. python画图哆啦a梦-python 绘制哆啦A梦

    [实例简介] 绘制哆啦A梦 [实例截图] [核心代码] #!/usr/bin/python # -*- coding: UTF-8 -*- # 哆啦A梦 import turtle def flyTo ...

  9. python画图哆啦a梦-【Python】绘制哆啦A梦

    from turtle import * #无轨迹跳跃 defmy_goto(x, y): penup() goto(x, y) pendown()#眼睛 defeyes(): fillcolor(& ...

最新文章

  1. python 三分钟入门_Cython 三分钟入门教程
  2. 69亿美元英伟达史上最大收购!这家基金又赢了
  3. 解决编译twrp3.0.3遇到的问题
  4. hbase shell-namespace(命名空间指令)
  5. H3C LMI协议标准
  6. Git学习笔记05--git stash
  7. SQL Server 移动数据库
  8. stmt在java中的应用_JDBC技术基础总结转载,非原创
  9. android 串口通信_使用UART与ZYBO进行通信常用外设设计方案
  10. linux禁用用户账号,技术|在 Linux 系统中禁用与解禁用户的账号
  11. figma下载_在Figma上进行原型制作的各种触发选项
  12. js怎么获取一个元素与屏幕右边的距离_js中如何获取某个元素到浏览器最左和最右的距离...
  13. 常见运行时异常 java 114982568
  14. mysql 指令没有用_Mysql指令
  15. Linux命令拆分csv文件,linux – 如何剪切CSV文件
  16. 【C语言】 C语言图形编程 俄罗斯方块 课程设计
  17. 找到Java中长整型(long)所能表示的最大素数: 9223372036854775783
  18. 解决premiere时间轴clip单元上右键Edit in audition编辑灰色失效的BUG
  19. 音乐对计算机专业的影响,计算机网络技术对音乐发展的影响探讨
  20. 商场、超市信息发布系统解决方案

热门文章

  1. 再读《精通css》04:盒模型和空白边叠加
  2. loadClass和forName 的区别
  3. Python中的那些“坑”
  4. VBA语言(二)变量、数据类型和常量
  5. django 模板语言之 simple_tag 自定义模板
  6. WLC HA-维护模式(Maintenance Mode)
  7. Alamofire源码解读系列(五)之结果封装(Result)
  8. 远程方法调用简单实现
  9. 给老婆写的带返回的2048(数据库存储)
  10. Singleton、MultiThread、Lib——实现单实例无锁多线程安全API