Python Turtle
之前对这个turtle这个模块不了解,觉得没什么意思,最近试了一下发现不错,来点最简单的。写的时候深刻感受到自己智商是个硬伤,算角度都算了半天。。。
图就不导了吧,懒癌晚期。。。
import turtle
#I
turtle.penup()
turtle.goto(-400,100)
turtle.color("yellow")
turtle.pendown()
turtle.pensize(5)
turtle.begin_fill()
turtle.color("yellow")
turtle.forward(120)
turtle.right(90)
turtle.forward(40)
turtle.right(90)
turtle.forward(40)
turtle.right(-90)
turtle.forward(100)
turtle.right(-90)
turtle.forward(40)
turtle.right(90)
turtle.forward(40)
turtle.right(90)
turtle.forward(120)
turtle.right(90)
turtle.forward(40)
turtle.right(90)
turtle.forward(40)
turtle.right(-90)
turtle.forward(100)
turtle.right(-90)
turtle.forward(40)
turtle.right(90)
turtle.forward(40)
turtle.end_fill()
#L
turtle.penup()
turtle.goto(-260,100)
turtle.pendown()
turtle.pensize(5)
turtle.color("red")
turtle.right(180)
turtle.forward(180)
turtle.right(-90)
turtle.forward(60)
turtle.right(-90)
turtle.forward(20)
turtle.right(-90)
turtle.forward(40)
turtle.right(90)
turtle.forward(160)
turtle.right(-90)
turtle.forward(20)
turtle.end_fill()
#o
turtle.penup()
turtle.goto(-140,0)
turtle.pendown()
turtle.pensize(20)
turtle.circle(40)
#v
turtle.penup()
turtle.goto(-60,0)
turtle.pendown()
turtle.pensize(20)
turtle.right(250)
turtle.forward(80)
turtle.right(220)
turtle.forward(80)
#e
turtle.penup()
turtle.goto(40,-40)
turtle.pendown()
turtle.pensize(20)
turtle.right(70)
turtle.forward(60)
turtle.right(-90)
turtle.forward(40)
turtle.right(-90)
turtle.forward(60)
turtle.right(-90)
turtle.forward(80)
turtle.right(-90)
turtle.forward(60)
#u
turtle.penup()
turtle.goto(140,100)
turtle.pendown()
turtle.pensize(5)
turtle.color("purple")
turtle.begin_fill()
turtle.color("purple")
turtle.right(90)
turtle.forward(180)
turtle.right(-90)
turtle.forward(100)
turtle.right(-90)
turtle.forward(180)
turtle.right(-90)
turtle.forward(20)
turtle.right(-90)
turtle.forward(160)
turtle.right(90)
turtle.forward(60)
turtle.right(90)
turtle.forward(160)
turtle.right(-90)
turtle.forward(20)
turtle.end_fill()
turtle.done()
Python Turtle的更多相关文章
- python+turtle 笔记
用Python+turtle绘制佩琪: from turtle import * def nose(x,y):#鼻子 penup()#提起笔 goto(x,y)#定位 pendown()#落笔,开始画 ...
- 从Scratch到Python——python turtle 一种比pygame更加简洁的实现
从Scratch到Python--python turtle 一种比pygame更加简洁的实现 现在很多学校都开设了Scratch课程,学生可以利用Scratch创作丰富的作品,然而Scratch之后 ...
- 让小乌龟可以唱歌——对Python turtle进行拓展
在Scratch中,小猫是可以唱歌的,而且Scratch的声音木块有着丰富的功能,在这方面Python turtle略有欠缺,今天我们就来完善一下. Python声音模块 Python处理声音的模块很 ...
- Python turtle绘制阴阳太极图代码解析
本文详细分析如何使用Python turtle绘制阴阳太极图,先来分解这个图形,图片中有四种颜色,每条曲线上的箭头表示乌龟移动的方向,首先从中心画一个半圆(红线),以红线所示圆的直径作半径画一个校园, ...
- Note of Python Turtle
Note of Python Turtle Turtle 库函数是 Python语言中一个流行的绘图函数库.Turtle 意思是海龟,在Python中显示为一个小箭头,通过它的移动而留 ...
- Python turtle库详解
Python turtle库详解 Turtle库是Python语言中一个很流行的绘制图像的函数库,想象一个小乌龟,在一个横轴为x.纵轴为y的坐标系原点,(0,0)位置开始,它根据一组函数指令的控制,在 ...
- Python turtle库的画笔控制说明
turtle.penup() 别名 turtle.pu() :抬起画笔海龟在飞行 turtle.pendown() 别名 turtle.pd():画笔落下,海龟在爬行 turtle.pensize(w ...
- Python Turtle库绘制蟒蛇
使用Python Turtle库来绘制蟒蛇 import turtle引入了海龟绘图体系 使用setup函数,设定了一个宽650像素和高350像素的窗体,其位置左上角坐标是200,200 说明位置在距 ...
- 10分钟轻松学会python turtle绘图
 1. 画布(canvas) 1.1 相关函数: 2. 画笔 2.1 画笔的状态 2.2 画笔的属性 2.3 绘图命令 3. 命令详解 4. 绘图举例 4.1 太阳花 4.2 绘制小蟒蛇 4.3 绘 ...
- python turtle 书写新年快乐
文章链接:https://mp.weixin.qq.com/s/xYSKH_KLYfooIoelJH02Cg 农历2018年的最后一篇文章,踏上回家的征途前,推荐一个Python的三方库turtle, ...
随机推荐
- PHP中常见的提示对照表
.Notice: Undefined variable: 变量名 in 注:使用了一个没有被定义的变量 .Parse error: syntax error, unexpected T_ELSE in ...
- Markdown简单语法
Content 标题大小 斜体和加粗 分割线 有序列表和无序列表 链接 代码框 标题大小 在字体下方加上-和=分别表示一级标题和二级标题,例如: 一级标题 --- 二级标题 === 或者使用#的个数表 ...
- .htaccess中Apache配置详解
1.<IfDefine> 指令 说明 封装一组只有在启动时当测试结果为真时才生效的指令 语法 <IfDefine [!]parameter-name> ... </IfD ...
- asp:Repeater实例备忘
1.前置部分 <asp:Repeater ID="rptPlanNo" runat="server" OnItemDataBound="rptP ...
- iOS 事件传递(Touch事件)
先总说如下: 1.当手指触摸到屏幕时,会产生UITouch对象和UIEvent对象. 2.这两个对象产生后会被传递到UIApplication管理的一个事件队列中. 3.再有UIApplication ...
- POI完美解析Excel数据到对象集合中(可用于将EXCEL数据导入到数据库)
实现思路: 1.获取WorkBook对象,在这里使用WorkbookFactory.create(is); // 这种方式解析Excel.2003/2007/2010都没问题: 2.对行数据进行解析 ...
- 编译osgEarth2.8+VS2013+CMake3.4.0在Release版本的问题
1>LINK : fatal error LNK1181: 无法打开输入文件"optimized.lib" 可以到http://forum.osgearth.org搜索相关帖 ...
- Mahout推荐算法API详解
转载自:http://blog.fens.me/mahout-recommendation-api/ Hadoop家族系列文章,主要介绍Hadoop家族产品,常用的项目包括Hadoop, Hive, ...
- kettle系列-6.kettle实现多字段字典快速翻译
在数据清洗转换中,常见的字典翻译,如性别在原表中是1(男).2(女)等,类似还有很多较大的字典需要翻译,若同一个表中有很多个字典需要翻译,采用[数据库查询]方式翻译的话效率就会相当低下. 这里采用ja ...
- Golang 语法学习笔记
Golang 语法学习笔记 包.变量和函数. 包 每个 Go 程序都是由包组成的. 程序运行的入口是包 main. 包名与导入路径的最后一个目录一致."math/rand" 包由 ...