小白一只,画的粗糙,家人们别介意,过几天整理一些turtle绘图的知识点。

#Author:Grapefruit
#Data:2021/10/20import turtle as t
t.title('小熊猫')
t.pensize(3)
t.speed(0)
t.fillcolor('black')
t.hideturtle()#标题
t.penup()
t.goto(0,240)
t.write("This is the first panda I painted.", align = "center",font = ("Times", 18, "bold"))#头
t.penup()
t.goto(110,120)
t.seth(120)
t.pendown()
t.circle(127,120)#调整对称
# t.penup()
# t.goto(110,120)
# t.seth(-90)
# t.pendown()
# t.forward(20)
#
# t.penup()
# t.goto(-110,120)
# t.seth(-90)
# t.pendown()
# t.forward(20)t.penup()
t.goto(-110,120)
t.seth(-120)
t.pendown()
t.circle(70,130)t.penup()
t.goto(110,120)
t.seth(-60)
t.pendown()
t.circle(-70,130)#耳朵
#左
t.penup()
t.goto(-80,156)
t.begin_fill()
t.seth(90)
t.pendown()
t.circle(33,275)
t.end_fill()#右
t.penup()
t.goto(80,156)
t.begin_fill()
t.seth(90)
t.pendown()
t.circle(-33,275)
t.end_fill()#眼睛
#左
t.penup()
t.goto(-60,50)
t.seth(-30)
t.begin_fill()
t.pendown()
a=0.2
for i in range(120):if 0<=i<30 or 60<=i<90:a=a+0.05t.lt(3)t.fd(a)else:a=a-0.05t.lt(3)t.fd(a)
t.end_fill()t.fillcolor('white')
t.penup()
t.goto(-45,70)
t.begin_fill()
t.pendown()
t.circle(7,360)
t.end_fill()#右
t.penup()
t.goto(60,50)
t.seth(30)
t.begin_fill()
t.fillcolor('black')
t.pendown()
a=0.2
for i in range(120):if 0<=i<30 or 60<=i<90:a=a+0.05t.lt(3)t.fd(a)else:a=a-0.05t.lt(3)t.fd(a)
t.end_fill()t.fillcolor('white')
t.penup()
t.goto(45,70)
t.begin_fill()
t.pendown()
t.circle(7,360)
t.end_fill()#鼻子
t.penup()
t.goto(-7,55)
t.seth(-90)
t.fillcolor('black')
t.begin_fill()
t.pendown()
a=0.05
for i in range(120):if 0<=i<30 or 60<=i<90:a=a+0.02t.lt(3)t.fd(a)else:a=a-0.02t.lt(3)t.fd(a)
t.end_fill()#嘴
#左
t.penup()
t.goto(0,50)
t.pendown()
t.circle(-11,190)
#右
t.penup()
t.goto(0,50)
t.seth(-90)
t.pendown()
t.circle(11,190)#左手
t.penup()
t.goto(-40,15)
t.begin_fill()
t.seth(180)
t.pendown()
t.circle(-70,15)t.penup()
t.goto(-55,15)
t.seth(220)
t.pendown()
t.circle(25,142)t.penup()
t.goto(-40,15)
t.seth(-80)
t.pendown()
t.circle(20,35)t.penup()
t.goto(-35,5)
t.seth(0)
t.pendown()
t.circle(-17,190)
t.end_fill()
#右手
t.penup()
t.goto(40,15)
t.begin_fill()
t.seth(0)
t.pendown()
t.circle(-70,15)t.penup()
t.goto(55,15)
t.seth(-40)
t.pendown()
t.circle(-25,142)t.penup()
t.goto(40,15)
t.seth(-80)
t.pendown()
t.circle(-20,35)t.penup()
t.goto(35,5)
t.seth(180)
t.pendown()
t.circle(17,190)
t.end_fill()#肚子
#左
t.penup()
t.goto(-55,-25)
t.seth(-110)
t.pendown()
t.circle(35,25)
#右
t.penup()
t.goto(55,-25)
t.seth(-70)
t.pendown()
t.circle(-35,25)#左脚
t.penup()
t.goto(-30,-50)
t.seth(140)
t.begin_fill()
t.pendown()
t.circle(35,235)t.penup()
t.goto(-30,-50)
t.seth(-100)
t.pendown()
t.circle(30,35)t.penup()
t.goto(-28,-68)
t.seth(-30)
t.pendown()
t.circle(-23,160)
t.end_fill()#右脚
t.penup()
t.goto(30,-50)
t.seth(40)
t.begin_fill()
t.pendown()
t.circle(-35,235)t.penup()
t.goto(30,-50)
t.seth(-80)
t.pendown()
t.circle(-30,35)t.penup()
t.goto(28,-68)
t.seth(-150)
t.pendown()
t.circle(23,160)
t.end_fill()#屁股
t.penup()
t.goto(-15,-90)
t.seth(-15)
t.pendown()
t.circle(65,45)t.mainloop()

运行结果:

Python turtle绘图小熊猫相关推荐

  1. python turtle循环图案-有趣的Python turtle绘图

    原标题:有趣的Python turtle绘图 Python Turtle是Python的一个编程教育类库,越来越受到教育者的关注,近日,以"智能时代,逐梦成长"为主题的第5届全国青 ...

  2. python turtle 绘图速度用函数会快吗_有趣的Python turtle绘图

    专 题 Feature Story 16 \ China Science & Technology Education 文 _ 毛京宇/北京师范大学第三附属中学 魏云靖/北京市师达中学 有趣的 ...

  3. Python Turtle绘图[难度2星]:甜美棒棒糖(基础效果 / 加描边优化)

    我喜欢turtle绘图,因为代码一点点的改动,总会带来意想不到的惊喜. 一些让我心动过的案例,分享给大家,也珍藏给自己. --Python教学路上的爬行者    案例1:棒棒糖(基础效果)       ...

  4. pythonturtle简单绘图_10分钟轻松学会 Python turtle 绘图

    10分钟轻松学会 Python turtle 绘图 python2.6版本中后引入的一个简单的绘图工具,叫做海龟绘图(Turtle Graphics),turtle库是python的内部库,使用导入即 ...

  5. Python Turtle绘图[难度3星]:24节气倒计时(2.使用字典存储数据)

    "我喜欢turtle绘图,因为代码一点点的改动,总会带来意想不到的惊喜. 一些让我心动过的案例,分享给大家,也珍藏给自己." -- 初中信息技术教师  许华丽 Python Tur ...

  6. python创意绘图-有趣的Python turtle绘图

    原标题:有趣的Python turtle绘图 Python Turtle是Python的一个编程教育类库,越来越受到教育者的关注,近日,以"智能时代,逐梦成长"为主题的第5届全国青 ...

  7. 巴斯光年python turtle绘图__附源代码

    巴斯光年python turtle绘图__附源代码 本文目录: 一.python turtle海龟绘图效果图 写在前面的题外话 二.绘图人物简介 三.代码演示方法和代码命令解释 四.怎么才能正常运行p ...

  8. 十分钟轻松学会python-10分钟轻松学会python turtle绘图

    python2.6版本中后引入的一个简单的绘图工具,叫做海龟绘图(Turtle Graphics),turtle库是python的内部库,使用导入即可 import turtle 先说明一下turtl ...

  9. Python Turtle绘图 鼠年画老鼠爷

    Python Turtle绘图 鼠年画老鼠爷 前言 效果图 必要知识 源代码 后记 前言 本文介绍的是如何运用Python的turtle画一只老鼠.为什么会无聊想到做这个呢?还不是想获得24小时的请假 ...

最新文章

  1. Angular 2 Pipe
  2. TCP/IP协议栈在MSP430单片机上的实现
  3. EJS学习(一)之特性、安装、工作原理
  4. SpringBoot2.0实现静态资源版本控制
  5. lock锁和monitor.enter锁
  6. atitit.atiOrmStoreService 框架的原理与设计 part1  概述与新特性
  7. 学习日记0904并发编程socketserver模块 进程理论
  8. jQuery的几种简单实用效果
  9. 2021年南阳市五中高考成绩查询,南阳市“赫赫有名”的五大高中,2020年高考成绩一目了然!...
  10. 在线pdf转word
  11. 7.13 Python循环语句(2)、number、字符串
  12. #SpringBoot#阿里云服务器#将微信小程序后端代码部署到阿里云服务器 http转https
  13. 前端实现Flexpaper的界面的效果
  14. jQuery 遍历 - 同胞(siblings)
  15. 前端(HTML+CSS+JS)
  16. 最小生成树Prim算法java实现
  17. 单片机执行指令过程详解
  18. Prince and Princess UVA - 10635
  19. 微信公众帐号开发教程
  20. oracle routine是什么意思,routine是什么意思_routine的用法

热门文章

  1. 【转】增益模型营销逻辑再理解
  2. 哈佛大学的在线中国地图,包含交通网络(含高铁、高速、机场等)、宗教信仰分布、人口密度图、能源图、教育分布、环境(水质、空气质量、CO2、PM2.5等)
  3. phalapi 数据库锁_phalapi-进阶篇5(数据库读写分离以及多库使用)
  4. Ubuntu打印服务器配置
  5. java中重写的目的是什么_Java课后简答题
  6. 学术-数学:不可能图形
  7. GRASP优化算法原理梳理和应用细节
  8. Linux 通配符与三种引号
  9. 20202407 2021-2022-2 《网络与系统攻防技术》实验四实验报告
  10. [linux] 查看进程PID以及进程详细信息