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, ...
随机推荐
- android-获得".apk"文件的相关信息。包名、版本号等等
String filePath = "/sdcard/feijiedemo.apk"; PackageManager packageManager = getPackageMana ...
- 一些VS2013下使用QT和MFC的错误解决方案
http://blog.csdn.net/lovejiayang/article/details/51853191
- c++中的继承与初始化
1.在c++中构造函数.析构函数.=运算符.友元无法继承 2.const 成员.引用成员.类的对象成员没有默认构造函数时,需在类的构造函数初始化列表中对其进行初始化 3.基类无默认构造函数,派生类需在 ...
- kernel 4.4.12 外部模块Makefile 脚本编写
kernel 4.4.12 最简单module的编译 上一篇博客上面有一个最简单的模块源代码,今天就上一个Makefile,运行make 就可以编译一个外部的模块. vim Makefile 这个是我 ...
- module 和 module.exports 的区别
自己理解的不好,推荐一篇文章吧: http://www.cnblogs.com/pigtail/archive/2013/01/14/2859555.html
- iOS CocoaPods 版本安装问题
今天安装salesforce中的pods,这是里面的podfile # Uncomment this line to define a global platform for your project ...
- html的a标签display:block之后文字竖直居中
设置行高和a标签的高度一样就能居中,使用line-height
- 简单的c#winform象棋游戏(附带源码)
算法源自网络(网络源码连接:http://www.mycodes.net/161/6659.htm) 整体思路:用二维数组构建棋盘每一个数组元素封装为一个picturebox附带若干属性(例如:棋 ...
- Android笔记:蓝牙
if (!BTAdapter.isEnabled()) { //没有打开,就启动确认窗口询问用户是否打开 Intent i = new Intent(BluetoothAdapter.ACTION_R ...
- 各种webservice调用地址
http://www.webxml.com.cn/zh_cn/web_services.aspx