turtle画王思聪吃热狗(杨艳春,何金凝小组)
点击此处查看视频:http://v.douyin.com/RCY8GD/
import turtle as t
t.setup(450,300)
t.pensize(4)
t.color('black')
'衣服身子'
t.speed(1)
t.fillcolor('#808080')
t.begin_fill()
t.goto(-70,30)
t.right(180)
t.circle(5,180)
t.right(180)
t.circle(10,180)
t.right(180)
t.circle(5,180)
t.end_fill() t.speed(10)
t.fillcolor('#7D916F')
t.begin_fill()
t.goto(15,0)
t.left(45)
t.fd(10)
t.right(90)
t.circle(5)
t.fd(5)
t.right(20)
t.fd(5)
t.right(40)
t.fd(10)
t.right(50)
t.fd(20)
t.left(60)
t.fd(10)
t.right(80)
t.fd(70)
t.right(90)
t.fd(25)
t.end_fill() '外侧头发' t.penup()
t.goto(10,80)
t.pendown()
t.fillcolor('#2A3025')
t.begin_fill()
t.circle(5,150)
t.right(150)
t.circle(5,150)
t.right(150)
t.circle(5,120)
t.right(100)
t.circle(5,120)
t.right(100)
t.circle(5,120)
t.right(90)
t.circle(5,120)
t.right(150)
t.circle(5,120)
t.right(90)
t.circle(5,120)
t.right(100)
t.circle(5,120)
t.right(90)
t.circle(5,120)
t.right(150)
t.circle(5,120)
t.right(90)
t.circle(5,120)
t.right(100)
t.circle(10,90)
t.fd(7)
t.end_fill() '内测头发' t.penup()
t.goto(10,80)
t.pendown()
t.fillcolor('white')
t.begin_fill()
t.goto(10,76)
t.right(150)
t.fd(10)
t.circle(20,50)
t.right(30)
t.fd(5)
t.left(60)
t.fd(10)
t.right(60)
t.fd(5)
t.left(70)
t.fd(19)
t.right(60)
t.fd(3)
t.right(60)
t.fd(3)
t.circle(10,200)
t.end_fill() '鼻子'
t.penup()
t.goto(10,76)
t.pendown()
t.fillcolor('white')
t.begin_fill()
t.goto(17,76)
t.right(45)
t.fd(2)
t.right(45)
t.fd(5)
t.left(90)
t.fd(10)
t.right(90)
t.fd(8)
t.right(80)
t.fd(13) '嘴'
t.left(150)
t.fd(10)
t.fillcolor('white')
t.end_fill() '热狗'
t.fillcolor('#FF8247')
t.begin_fill()
t.left(35)
t.fd(40)
t.right(30)
t.fd(9)
t.right(30)
t.fd(9)
t.right(30)
t.fd(9)
t.right(30)
t.fd(9)
t.right(30)
t.fd(9)
t.right(30)
t.fd(9)
t.left(5)
t.fd(40)
t.right(30)
t.fd(9)
t.right(30)
t.fd(9)
t.right(30)
t.fd(9)
t.right(30)
t.fd(9)
t.right(30)
t.fd(9)
t.right(30)
t.fd(9)
t.end_fill() '眼睛'
t.penup() t.pensize(2) t.goto(0,70)
t.pendown() t.goto(-4,70)
t.goto(-8,68)
t.penup()
t.goto(-5,60)
t.pendown()
t.circle(1,360)
t.goto(-5,60)
t.pendown()
t.circle(2,360) t.penup()
t.goto(100,-20)
t.pendown()
turtle画王思聪吃热狗(杨艳春,何金凝小组)的更多相关文章
- 使用turtle画故宫(伍奇,侯俊豪小组)
这个代码主要有两个部分,第一部分是画出故宫,第二部分是用random函数随机画心,故宫部分设置多个函数和循环再进行颜色填充即可完成. 此处为视频链接 from turtle import* impor ...
- python运用turtle 画出汉诺塔搬运过程
python运用turtle 画出汉诺塔搬运过程 1.打开 IDLE 点击File-New File 新建立一个py文件 2.向py文件中输入如下代码 import turtle class Stac ...
- python3 turtle 画国际象棋棋盘
python3 turtle 画国际象棋棋盘 #!/usr/bin/env python # -*- coding:utf-8 -*- # Author:Hiuhung Wan import turt ...
- day 03 turtle 画鹅
turtle 画鹅 import turtle t=turtle turtle.speed(10) t. setup(800,600) #画头 turtle.penup() turtle.goto(0 ...
- *【Python】【demo实验31】【练习实例】【使用turtle画小猪佩奇】
如下图小猪佩奇: 要求使用turtle画小猪佩奇: 源码: # encoding=utf-8 # -*- coding: UTF-8 -*- # 使用turtle画小猪佩奇 from turtle i ...
- 【Python】【demo实验29】【练习实例】【使用turtle画五角星】
原题: 使用turtle画五角星: 我的代码: #!/usr/bin/python # encoding=utf-8 # -*- coding: UTF-8 -*- from turtle impor ...
- 用python turtle画玫瑰
1.turtle 库 2.画玫瑰的代码: import turtle turtle.penup() turtle.left() turtle.fd() turtle.pendown() turtle. ...
- Python之turtle画同心圆和棋盘
画饼图 import turtle t = turtle.Pen() for i in range(5): t.penup() t.goto(0, -i*30) t.pendown() t.circl ...
- 用python的turtle画分形树
由于分形树具有对称性,自相似性,所以我们可以用递归来完成绘制.只要确定开始树枝长.每层树枝的减短长度和树枝分叉的角度,我们就可以把分形树画出来啦!! 代码如下: # -*- coding: utf-8 ...
随机推荐
- 09-Http & Servlet
Http协议&Servlet Http协议 什么是协议 > 双方在交互.通讯的时候, 遵守的一种规范.规则. http协议 > 针对网络上的客户端 与 服务器端在执行http请求的 ...
- 封装的head
//获取浏览器和版本号var userAgent=window.navigator.userAgent, rMsie=/(msie\s|trident.*rv:)([\w.]+)/, rFirefox ...
- word使用新技能
office2013版,菜单栏-审阅-修订-所有标记,可以显示编辑过程中的所有修改步骤,还可查看未修改的原始状态.前提是“修订”按钮 要点亮! 给文档添加索引,并自动生成索引列表 文件-选项-显示-隐 ...
- tp5.0与mysql存储过程
存储过程是一组预编译的sql语句,只需要创建一次过程,以后在程序中就可以调用该过程任意次,执行的速度快于普通sql语句,对于没有权限执行存储过程的用户,也可授权他们执行存储过程,存储过程是保存在数据库 ...
- Nginx 自定义404、500、502 页面
利用nginx的反向代理来实现 服务器404 和500 等状态码的自定义页面 1.nginx配置文件 nginx.conf 配置开启代理错误拦截 和配置页面 下划线部分 http { ...... ...
- virtualenvwrapper虚拟环境
之前学习过python的虚拟环境virtualenv,而virtualenvwrapper这个软件包可以让我们管理虚拟环境变得更加简单,不用再跑到某个目录下通过virtualenv来创建虚拟环境,并且 ...
- zookeeper 日志输出到指定文件夹
最近在研究Zookeeper Storm Kafka, 顺便在本地搭了一套集群, 遇到了Zookeeper日志问题输出路径的问题, 发现zookeeper设置log4j.properties不能解决日 ...
- JAVA RPC(一)RPC入门
为什么要写这个RPC 市面上常见的RPC框架很多,grpc,motan,dubbo等,但是随着越来越多的元素加入,复杂的架构设计等因素似使得这些框架就想spring一样,虽然号称是轻量级,但是用起来却 ...
- wrapper induction随笔
本文是一篇介绍Wrapper Induction的阅读笔记,原文详见<Wrapper induction:Efficiency and expressiveness>. Wrapper I ...
- git 远程
git remote add origin [远程仓库地址]