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, ...
随机推荐
- Qt for Android开发环境搭建及测试过程记录
最近学习了Qt的QML编程技术,感觉相较于以前的QtGUI来说更方便一些,使用QML可以将界面与业务逻辑解耦,便于开发. QML支持跨平台,包括支持Android平台,因此可以使用Qt的QML进行An ...
- javascript 性能惰性加载2016.12.13
利用函数的惰性载入提高 javascript 代码性能 原文:利用函数的惰性载入提高javascript代码性能 作者:阿安 在 javascript 代码中,因为各浏览器之间的行为的差异,我们经常会 ...
- 《转载》myeclipse 上安装 Maven3
本文转载自http://www.cnblogs.com/fancyzero/archive/2012/06/09/maven3.html 环境准备: JDK 1.6 Maven 3.0.4 myecl ...
- Ninject学习(一) - Dependency Injection By Hand
大体上是把官网上的翻译下而已. http://www.ninject.90iogjkdcrorg/wiki.html Dependency Injection By Hand So what's Ni ...
- mysql基础类型知识总结
Mysql知识回顾 http://www.educity.cn/wenda/596225.html http://blog.csdn.net/dyllove98/article/details/928 ...
- day5
作业 作业需求: 模拟实现一个ATM + 购物商城程序 额度 15000或自定义 实现购物商城,买东西加入 购物车,调用信用卡接口结账 可以提现,手续费5% 每月22号出账单,每月10号为还款日,过期 ...
- CentOS下采用Crontab实现PHP脚本定时任务
简单实现一个需求,每5分钟往特定表中插入2条数据.经过分析还是采用crontab方式靠谱,另外执行php脚本的方式,不用担心链接超时等问题. 1.准备工作,创建1个数据表“person”, CREAT ...
- tp框架实现ajax
不墨迹,直接进主题. tp框架实现ajax 首先,我们先做一个testajax.html用来显示页面(只是一个简单的下拉列表^_^) <!DOCTYPE html PUBLIC "-/ ...
- 创建/发布cocoapods公共库
对于大多数iOS开发者而言,cocoapods都是一个非常便捷的第三方库引导工具,该工具可以帮助我们快速导入所需第三方库,并且进行相关配置. 本文即为描述如何发布一个第三方库,提供给所有的开发者使用. ...
- Appium_Python_Api文档
1.contextscontexts(self): Returns the contexts within the current session. 返回当前会话中的上下文,使用后可以识别H5页面的控 ...