用python画柯南

一、几个参数

  • 代码第四行tl.speed()中的8代表画图的速度,可以设置其他整数
  • 中间代码比较麻烦,都是各种函数的调用,可自行研究
  • 倒数第六行和倒数第四行代码可设置字体颜色
  • 倒数第五行和倒数第三行是祝福话语,可自行编辑
  • 倒数第二行是画图结束后程序暂停2.5秒后自动关闭

二、效果图

三、代码

#生日礼物
#author:舒傲寒
#sendTo:小朋友
import turtle as tl
import time
tl.setup(1580,800,0,0)
tl.speed(8)
tl.pensize(3)
tl.up()
tl.goto(0,-190)
tl.seth(90)
tl.fd(110)
tl.seth(10)
tl.fd(-15)
tl.pd()
tl.fd(-10)
tl.up()
tl.goto(0,-80)
tl.seth(-5)
tl.pd()
tl.fd(40)
tl.up()
tl.goto(0,-25)
tl.seth(0)
tl.pd()
tl.circle(12,90)
tl.seth(135)
tl.circle(-35,45)
tl.seth(-125)
tl.circle(40,60)
tl.up()
tl.goto(0,210)
tl.seth(167)
tl.pd()
tl.fillcolor("black")
tl.begin_fill()
tl.circle(910,26)
tl.seth(230)
tl.circle(145,80)
tl.circle(225,43)
tl.circle(225,43)
tl.circle(170,90)
tl.end_fill()
tl.up()
tl.fd(-17)
tl.seth(171)
tl.pd()
tl.fillcolor("white")
tl.begin_fill()
tl.circle(910,22)
tl.seth(232)
tl.circle(145,83)
tl.circle(223,42)
tl.circle(223,42)
tl.circle(167,90)
tl.end_fill()
tl.up()
tl.goto(0,210)
tl.seth(13)
tl.pd()
tl.fillcolor("black")
tl.begin_fill()
tl.circle(-910,26)
tl.seth(-50)
tl.circle(-145,80)
tl.circle(-225,43)
tl.circle(-225,43)
tl.circle(-170,90)
tl.end_fill()
tl.up()
tl.fd(-17)
tl.seth(9)
tl.pd()
tl.fillcolor("white")
tl.begin_fill()
tl.circle(-910,22)
tl.seth(-52)
tl.circle(-145,83)
tl.circle(-223,42)
tl.circle(-223,42)
tl.circle(-167,90)
tl.end_fill()
tl.up()
tl.goto(0,-190)
tl.seth(170)
tl.pd()
tl.circle(-580,25)
tl.circle(-120,30)
tl.circle(620,22)
tl.circle(-380,35)
tl.up()
tl.goto(0,-190)
tl.seth(10)
tl.pd()
tl.circle(580,30)
tl.circle(120,25)
tl.circle(-620,22)
tl.circle(380,35)
tl.up()
tl.goto(-185,160)
tl.seth(-65)
tl.pd()
tl.fillcolor("black")
tl.begin_fill()
tl.circle(-45,220)
tl.circle(-190,10)
tl.up()
tl.goto(-185,160)
tl.seth(160)
tl.pd()
tl.pensize(6)
tl.fd(-15)
tl.fd(93)
tl.end_fill()
tl.seth(190)
tl.circle(160,35)
tl.left(90)
tl.fd(8)
tl.pensize(5)
tl.fd(7)
tl.pensize(4)
tl.fd(6)
tl.pensize(3)
tl.fd(5)
tl.up()
tl.fd(45)
tl.seth(0)
tl.fd(15)
tl.pd()
tl.seth(-40)
tl.circle(55,95)
tl.up()
tl.goto(185,160)
tl.seth(245)
tl.pd()
tl.fillcolor("black")
tl.begin_fill()
tl.circle(45,220)
tl.circle(190,10)
tl.up()
tl.goto(185,160)
tl.seth(20)
tl.pd()
tl.pensize(6)
tl.fd(-35)
tl.fd(113)
tl.end_fill()
tl.seth(-10)
tl.circle(-150,35)
tl.right(90)
tl.fd(8)
tl.pensize(5)
tl.fd(7)
tl.pensize(4)
tl.fd(6)
tl.pensize(3)
tl.fd(5)
tl.up()
tl.fd(45)
tl.seth(180)
tl.fd(15)
tl.seth(220)
tl.circle(-55,95)
tl.seth(-30)
tl.pd()
tl.circle(95,70)
tl.up()
tl.pencolor("white")
tl.pensize(7)
tl.goto(-255,180)
tl.seth(-75)
tl.pd()
tl.fd(82)
tl.up()
tl.pensize(4)
tl.goto(-267,148)
tl.pd()
tl.fd(35)
tl.pencolor("black")
tl.pensize(3)
tl.up()
tl.goto(-185,160)
tl.seth(-65)
tl.pd()
tl.fillcolor("white")
tl.begin_fill()
tl.circle(-30,220)
tl.circle(-150,8)
tl.end_fill()
tl.up()
tl.pencolor("white")
tl.pensize(9)
tl.goto(210,145)
tl.seth(-75)
tl.pd()
tl.fd(48)
tl.up()
tl.goto(183,148)
tl.pd()
tl.pensize(4)
tl.fd(45)
tl.pencolor("black")
tl.pensize(3)
tl.up()
tl.goto(185,160)
tl.seth(20)
tl.fd(20)
tl.seth(245)
tl.pd()
tl.fillcolor("white")
tl.begin_fill()
tl.circle(35,220)
tl.circle(145,11)
tl.end_fill()
tl.up()
tl.goto(-251,-80)
tl.pd()
tl.seth(170)
tl.circle(-350,70)
tl.circle(-30,170)
tl.up()
tl.goto(-280,-30)
tl.seth(176)
tl.pd()
tl.circle(-190,60)
tl.up()
tl.goto(-330,50)
tl.pd()
tl.seth(150)
tl.circle(135,45)
tl.up()
tl.goto(251,-80)
tl.pd()
tl.seth(10)
tl.circle(350,75)
tl.circle(17,170)
tl.up()
tl.goto(297,-30)
tl.seth(4)
tl.pd()
tl.circle(190,80)
tl.up()
tl.goto(348,50)
tl.pd()
tl.seth(45)
tl.circle(-165,45)
tl.up()
tl.goto(348,50)
tl.seth(60)
tl.pd()
tl.circle(-200,56)
tl.up()
tl.goto(-640,395)
tl.pd()
tl.seth(-160)
tl.circle(155,60)
tl.seth(70)
tl.circle(-174,72)
tl.seth(-140)
tl.circle(320,45)
tl.circle(120,45)
tl.seth(85)
tl.circle(-360,55)
tl.up()
tl.goto(-500,395)
tl.pd()
tl.seth(-120)
tl.circle(350,45)
tl.up()
tl.goto(-500,395)
tl.pd()
tl.pensize(1)
tl.seth(-150)
tl.circle(375,50)
tl.up()
tl.goto(-500,395)
tl.pd()
tl.pensize(3)
tl.seth(-120)
tl.circle(350,45)
tl.seth(90)
tl.circle(-380,47)
tl.seth(0)
tl.fd(30)
tl.seth(-130)
tl.circle(380,15)
tl.seth(40)
tl.circle(-380,25)
tl.up()
tl.seth(0)
tl.fd(-80)
tl.seth(-130)
tl.pd()
tl.circle(360,7)
tl.seth(40)
tl.circle(-380,22)
tl.up()
tl.goto(-500,395)
tl.seth(-110)
tl.pd()
tl.circle(375,27)
tl.seth(-90)
tl.circle(140,100)
tl.seth(138)
tl.circle(-510,14)
tl.circle(-65,70)
tl.fd(30)
tl.up()
tl.seth(90)
tl.fd(25)
tl.pd()
tl.seth(-95)
tl.circle(180,36)
tl.seth(100)
tl.circle(-200,23)
tl.circle(-130,45)
tl.fd(35)
tl.seth(-135)
tl.circle(230,43)
tl.seth(45)
tl.circle(230,43)
tl.seth(-110)
tl.circle(200,45)
tl.seth(100)
tl.circle(-170,38)
tl.up()
tl.seth(76)
tl.fd(35)
tl.pd()
tl.fillcolor("white")
tl.begin_fill()
tl.seth(-107)
tl.circle(253,50)
tl.seth(103)
tl.circle(-200,43)
tl.end_fill()
tl.up()
tl.fd(42)
tl.seth(0)
tl.fd(-12)
tl.pd()
tl.seth(-115)
tl.circle(235,42)
tl.up()
tl.seth(100)
tl.circle(-220,22)
tl.pd()
tl.pensize(2)
tl.circle(-220,23)
tl.seth(-100)
tl.fillcolor("white")
tl.begin_fill()
tl.circle(260,40)
tl.seth(130)
tl.circle(-235,36)
tl.end_fill()
tl.pensize(3)
tl.seth(90)
tl.circle(-200,32)
tl.seth(-90)
tl.circle(105,45)
tl.seth(-26)
tl.fd(80)
tl.seth(97)
tl.fd(105)
tl.seth(-33)
tl.fd(135)
tl.fillcolor("white")
tl.begin_fill()
tl.up()
tl.fd(35)
tl.seth(-65)
tl.pd()
tl.circle(-225,70)
tl.seth(55)
tl.circle(225,33)
tl.end_fill()
tl.circle(155,20)
tl.fillcolor("white")
tl.begin_fill()
tl.circle(155,43)
tl.seth(-75)
tl.circle(400,14.5)
tl.end_fill()
tl.fillcolor("white")
tl.begin_fill()
tl.circle(400,8.5)
tl.circle(-450,15)
tl.seth(170)
tl.circle(-510,18)
tl.circle(-260,50)
tl.end_fill()
tl.seth(-65)
tl.circle(279,45)
tl.fd(38)
tl.seth(130)
tl.fd(210)
tl.seth(-26)
tl.fd(79)
tl.seth(101)
tl.fd(107)
tl.seth(-26)
tl.fd(123)
tl.up()
tl.seth(0)
tl.fd(10)
tl.pd()
tl.seth(-65)
tl.fillcolor("white")
tl.begin_fill()
tl.circle(170,48)
tl.seth(150)
tl.circle(-150,35)
tl.end_fill()
tl.seth(130)
tl.fd(25)
tl.fd(-25)
tl.seth(-50)
tl.fillcolor("white")
tl.begin_fill()
tl.circle(178,49)
tl.fd(40)
tl.seth(170)
tl.circle(-160,50)
tl.end_fill()
tl.seth(-40)
tl.circle(180,25)
tl.seth(140)
tl.up()
tl.circle(180,25)
tl.pd()
tl.seth(140)
tl.circle(-180,15)
tl.seth(-5)
tl.fillcolor("white")
tl.begin_fill()
tl.circle(-230,60)
tl.seth(100)
tl.circle(240,28)
tl.end_fill()
tl.seth(-50)
tl.circle(160,50)
tl.seth(167)
tl.circle(-188,50)
tl.seth(-17)
tl.circle(-170,60)
tl.seth(97)
tl.circle(500,10)
tl.seth(-52)
tl.circle(-520,12)
tl.up()
tl.seth(75)
tl.fd(180)
tl.pd()
tl.fd(-45)
tl.seth(150)
tl.fd(80)
tl.seth(-85)
tl.fd(30)
tl.seth(170)
tl.fd(180)
tl.seth(-17)
tl.fd(220)
tl.seth(95)
tl.fd(30)
tl.seth(-30)
tl.fd(85)
tl.seth(86)
tl.fd(80)
tl.up()
tl.goto(-118,-158)
tl.seth(-116)
tl.pd()
tl.circle(100,30)
tl.fd(190)
tl.up()
tl.goto(-130,-150)
tl.pd()
tl.seth(-120)
tl.fd(210)
tl.seth(-26)
tl.circle(-140,23)
tl.seth(-170)
tl.fd(20)
tl.left(90)
tl.fd(30)
tl.fd(-30)
tl.left(90)
tl.fd(60)
tl.seth(60)
tl.fd(50)
tl.seth(-3)
tl.fd(60)
tl.seth(42)
tl.fd(51)
tl.fd(-51)
tl.fillcolor("white")
tl.begin_fill()
tl.seth(-3)
tl.fd(-60)
tl.seth(67)
tl.fd(60)
tl.end_fill()
tl.seth(127)
tl.fd(-10)
tl.fillcolor("white")
tl.begin_fill()
tl.fd(68)
tl.seth(4)
tl.fd(70)
tl.end_fill()
tl.seth(-40)
tl.fd(55)
tl.seth(60)
tl.fd(30)
tl.seth(-3)
tl.fd(30)
tl.fd(-30)
tl.seth(60)
tl.fd(-30)
tl.seth(-120)
tl.circle(50,80)
tl.seth(-3)
tl.fd(30)
tl.fd(-30)
tl.seth(-90)
tl.fd(90)
tl.fd(-25)
tl.seth(135)
tl.fd(42)
tl.up()
tl.goto(-130,-150)
tl.pd()
tl.seth(-120)
tl.fd(60)
tl.seth(190)
tl.fd(200)
tl.seth(-120)
tl.fd(140)
tl.seth(-75)
tl.fd(35)
tl.up()
tl.seth(0)
tl.fd(100)
tl.seth(120)
tl.pd()
tl.circle(-125,57)
tl.up()
tl.goto(118,-158)
tl.seth(-64)
tl.pd()
tl.circle(-100,30)
tl.fd(190)
tl.up()
tl.goto(130,-150)
tl.pd()
tl.seth(-60)
tl.fd(210)
tl.seth(206)
tl.circle(140,23)
tl.seth(-10)
tl.fd(20)
tl.right(90)
tl.fd(30)
tl.fd(-30)
tl.right(90)
tl.fd(60)
tl.seth(120)
tl.fd(50)
tl.seth(183)
tl.fd(60)
tl.seth(138)
tl.fd(51)
tl.fd(-51)
tl.fillcolor("white")
tl.begin_fill()
tl.seth(183)
tl.fd(-60)
tl.seth(113)
tl.fd(60)
tl.end_fill()
tl.seth(53)
tl.fd(-10)
tl.fillcolor("white")
tl.begin_fill()
tl.fd(68)
tl.seth(176)
tl.fd(70)
tl.end_fill()
tl.seth(220)
tl.fd(55)
tl.seth(120)
tl.fd(30)
tl.seth(120)
tl.fd(-30)
tl.seth(-60)
tl.circle(-50,80)
tl.seth(183)
tl.fd(30)
tl.fd(-30)
tl.seth(-90)
tl.fd(90)
tl.fd(-35)
tl.seth(45)
tl.fd(42)
tl.up()
tl.goto(130,-150)
tl.pd()
tl.seth(-60)
tl.fd(60)
tl.seth(-10)
tl.fd(200)
tl.seth(-60)
tl.fd(140)
tl.seth(255)
tl.fd(35)
tl.up()
tl.seth(180)
tl.fd(100)
tl.seth(60)
tl.pd()
tl.circle(125,57)
tl.up()
tl.goto(0,-205)
tl.pd()
tl.seth(182)
tl.circle(-142,50)
tl.up()
tl.goto(0,-205)
tl.pd()
tl.seth(-2)
tl.circle(142,50)
tl.up()
tl.seth(0)
tl.fd(250)
tl.pd()
tl.color("red")
tl.write("\n   小朋友\n   生日快乐!\n \n",font=("楷体",23,"normal"))
tl.color("brown")
tl.write("  												

用python画柯南相关推荐

  1. python编程100例海绵宝宝-用python画哆啦a梦

    广告关闭 2017年12月,云+社区对外发布,从最开始的技术博客到现在拥有多个社区产品.未来,我们一起乘风破浪,创造无限可能. 也收到了读者想用 python 画各种图的各种需求. 和一些读者沟通后才 ...

  2. 怎么用python画个电脑_python语言还是java如何用python画爱心

    用python绘制爱心的基本步骤如下: 002pc.com对<python语言还是java如何用python画爱心>总结来说,为我们学习Python很实用. 首先先下载安装好python程 ...

  3. 开学季,教你用Python画大学教室座位神分区图!网友直呼“中枪”

    作者 | 丁彦军 转载自恋习Python(ID:sldata2017) 我们上过大学的朋友们都知道,大学没有固定教室也没有固定的座位,所以大家可以随便找个自己喜欢的位置坐下. 别看这些不起眼的座位,感 ...

  4. 圣诞节!教你用Python画棵圣诞树

    作者 | 糖甜甜甜,985高校经管研二,擅长用 Python.R.tableau 等工具结合统计学和机器学习模型做数据分析. 来源 | 经管人学数据分析(ID:DAT-2017) 如何用Python画 ...

  5. 用python画时序图源代码_使用python实现画AR模型时序图

    背景: 用python画AR模型的时序图. 结果: 代码: import numpy as np import matplotlib.pyplot as plt """ ...

  6. 用python画微信捂脸_用 Python 画一个捂脸表情

    微信中的捂脸表情相信大家都不陌生,我见过以及自己使用这个表情的频率都是比较高的,可以说这个表情算是大部分人的主打表情之一了,本文我使用 Python 来画一下这个表情,我们使用到的库还是 turtle ...

  7. echarts词云图形状_怎么用Python画出好看的词云图?

    相信很多人在第一眼看到下面这些图时,都会被其牛逼的视觉效应所吸引,这篇文章就教大家怎么用Python画出这种图. 前期准备 上面的这种图叫做词云图,主要用途是将文本数据中出现频率较高的关键词以可视化的 ...

  8. 用python画动态樱花_利用python画一棵漂亮的樱花树,turtle画图代码大全,此处感谢知乎大佬小白...

    利用python画一棵漂亮的樱花树,turtle画图代码大全,此处感谢知乎大佬小白 此处感谢知乎大佬 小白练手 练习一下比较流行的turtle(海龟库) 画一棵漂亮的樱花树,效果如下: ps: 是动态 ...

  9. python绘制月亮_用python画月亮的代码是什么?

    用python画月亮的代码是什么? 用python画月亮的代码是import turtle as t t.screensize(800,600,"#483d8b")#画布尺寸和颜色 ...

最新文章

  1. matlab小技巧与verilog小技巧
  2. “主要的编程范型”及其语言特性关系(多图)
  3. 小短文 | 高并发系统,如何计算并发量和峰值数据?
  4. 关于字符的读入与输出
  5. IDEA 2021.1正式发布,新增了这几个超实用功能!
  6. 华为交换机端口不配置access_华为交换机如何配置端口组?华为交换机端口组-百度经验...
  7. IBM深陷云计算业务欺诈丑闻,遭股东集体诉讼
  8. Python实现分卷压缩
  9. 基于JSP实现医院病历管理系统,程序员如何在工作中自我增值
  10. 延期年金(deferred annuity)
  11. 流量焦虑意外带来契机,“福禄控股们”赚钱容易做大难?
  12. PS 2019 Mac版 自学入门系列(十二)—— 应用滤镜
  13. 计算机开机f8键,开机F8键“高级启动选项”的秘密
  14. 版本管理工具Cliosoft SOS安装并使用
  15. 张勋说:棒磨机断棒的几个可能原因
  16. windows下禁用时间同步(防止自动变回来)
  17. 在虚拟机上同步服务器上的时间_Hbase
  18. 人脸识别-闭集测试指标CMC曲线
  19. 说脏话,在人类的发展过程中有什么意义?
  20. 大泉州汽车网整站程序PHP生成html开源版 V1.1.4

热门文章

  1. 在虚幻4中显示鼠标并自定鼠标样式
  2. 企业使用scm系统的必要性
  3. QT 操作 excel 教程
  4. 牛油果是如何成为中产标配的?
  5. ios safari 模拟器_iOS开发之Safari调试WebView页面
  6. api connect like.php,WWW 无心宠物是一款php编写的 - 下载 - 搜珍网
  7. [导入]升级PJBlog2.5到PJBlog2.6
  8. 太原火车站附近的宾馆
  9. 【转载】对抗腾讯IP封杀 彩虹QQ显IP发布最新2.71
  10. IDEA 【强制推送】(Force Push)为灰色不能点击 解决办法