turtle
画一组同切圆
输入
import turtle
turtle.color('red')
turtle.circle(30)
turtle.circle(60)
turtle.circle(90)
turtle.circle(120)
turtle.circle(150)
turtle.circle(180)
turtle.hideturtle()
输出

画一组同心圆
输入
import turtle
turtle.pos()
turtle.color('red')
turtle.begin_fill()
turtle.up()
turtle.goto(0,-10)
turtle.down()
turtle.circle(10)
turtle.color('orange')
turtle.up()
turtle.goto(0,-30)
turtle.down()
turtle.circle(30)
turtle.color('yellow')
turtle.up()
turtle.goto(0,-60)
turtle.down()
turtle.circle(60)
turtle.color('green')
turtle.up()
turtle.goto(0,-90)
turtle.down()
turtle.circle(90)
turtle.color('blue')
turtle.up()
turtle.goto(0,-120)
turtle.down()
turtle.circle(120)
turtle.color('purple')
turtle.up()
turtle.goto(0,-150)
turtle.down()
turtle.circle(150)
turtle.color('pink')
turtle.up()
turtle.goto(0,-180)
turtle.down()
turtle.circle(180)
输出

画一个五角星
输入
import turtle turtle.forward(100)
turtle.right(144)
turtle.forward(100)
turtle.right(144)
turtle.forward(100)
turtle.right(144)
turtle.forward(100)
turtle.right(144)
turtle.forward(100)
turtle.right(144)
turtle.hideturtle()
输出

画一个黄色实心五角星
输入
import turtle
turtle.color('yellow')
turtle.fillcolor('yellow')
turtle.begin_fill()
turtle.forward(100)
turtle.right(144)
turtle.forward(100)
turtle.right(144)
turtle.forward(100)
turtle.right(144)
turtle.forward(100)
turtle.right(144)
turtle.forward(100)
turtle.right(144)
turtle.end_fill()
turtle.hideturtle()
输出

画左上角的五颗五角星
import turtle
turtle.bgcolor('red')
turtle.speed(100)
turtle.pos()
turtle.up()
turtle.goto(-400,200)
turtle.color('yellow')
turtle.fillcolor('yellow')
turtle.begin_fill()
turtle.forward(100)
turtle.right(144)
turtle.forward(100)
turtle.right(144)
turtle.forward(100)
turtle.right(144)
turtle.forward(100)
turtle.right(144)
turtle.forward(100)
turtle.right(144)
turtle.end_fill()
turtle.down()
turtle.up()
turtle.goto(-270,320)
turtle.color('yellow')
turtle.fillcolor('yellow')
turtle.begin_fill()
turtle.right(45)
turtle.forward(50)
turtle.right(144)
turtle.forward(50)
turtle.right(144)
turtle.forward(50)
turtle.right(144)
turtle.forward(50)
turtle.right(144)
turtle.forward(50)
turtle.right(144)
turtle.end_fill()
turtle.down()
turtle.up()
turtle.goto(-200,210)
turtle.color('yellow')
turtle.fillcolor('yellow')
turtle.begin_fill()
turtle.right(160)
turtle.forward(50)
turtle.right(144)
turtle.forward(50)
turtle.right(144)
turtle.forward(50)
turtle.right(144)
turtle.forward(50)
turtle.right(144)
turtle.forward(50)
turtle.right(144)
turtle.end_fill()
turtle.down()
turtle.up()
turtle.goto(-190,130)
turtle.color('yellow')
turtle.fillcolor('yellow')
turtle.begin_fill()
turtle.left(0)
turtle.forward(50)
turtle.right(144)
turtle.forward(50)
turtle.right(144)
turtle.forward(50)
turtle.right(144)
turtle.forward(50)
turtle.right(144)
turtle.forward(50)
turtle.right(144)
turtle.end_fill()
turtle.down()
turtle.up()
turtle.goto(-250,60)
turtle.color('yellow')
turtle.fillcolor('yellow')
turtle.begin_fill()
turtle.right(20)
turtle.forward(50)
turtle.right(144)
turtle.forward(50)
turtle.right(144)
turtle.forward(50)
turtle.right(144)
turtle.forward(50)
turtle.right(144)
turtle.forward(50)
turtle.right(144)
turtle.end_fill()
turtle.down()
turtle.hideturtle()
输出

turtle的更多相关文章
- Python Turtle
之前对这个turtle这个模块不了解,觉得没什么意思,最近试了一下发现不错,来点最简单的.写的时候深刻感受到自己智商是个硬伤,算角度都算了半天... 图就不导了吧,懒癌晚期... import tur ...
- Turtle Online:致力于打造超接地气的PC前端架构,组件+API,快速搭建前端开发
架构创作初衷 每当新开一个项目时,都会绞尽脑汁去考虑采用哪种框架:requirejs/seajs.jquery/zepto.backbone.easeUI/Bootstrap/AngularJS……, ...
- Turtle库
下列turtle库的简单常用指令 forward(distance) #将箭头移到某一指定坐标 left(angel) right(angel) penup() #提起笔,用于另起一个地方绘制时 ...
- python turtle,random,math
# List imports here: import turtle import random import math # List constants here (NO MAGIC NUMBERS ...
- CodeForces 132C Logo Turtle (记忆化搜索)
Description A lot of people associate Logo programming language with turtle graphics. In this case t ...
- 10分钟轻松学会python turtle绘图
 1. 画布(canvas) 1.1 相关函数: 2. 画笔 2.1 画笔的状态 2.2 画笔的属性 2.3 绘图命令 3. 命令详解 4. 绘图举例 4.1 太阳花 4.2 绘制小蟒蛇 4.3 绘 ...
- Python输入输出练习,运算练习,turtle初步练习
Hello World! 简单交互(交互式,文件式)教材P19 radius=25 area=3.1415*radius*radius print(area) print('{:.2f}'.forma ...
- python绘制图形(Turtle模块)
用python的Turtle模块可以绘制很多精美的图形,下面简单介绍一下使用方法. 需要用到的工具有python,python 的安装这里就不再细说.自行搜索. from turtle import ...
- python中的turtle库绘制图形
1. 前奏: 在用turtle绘制图形时,需要安装对应python的解释器以及IDE,我安装的是pycharm,在安装完pycharm后,在pycharm安装相应库的模块,绘图可以引入turtle模块 ...
- Python中的turtle初探
turtle Python自带了一个turtle库,就像名字turtle说的那样,你可以创建一个turtle,然后这个turtle可以前进,后退,左转,这个turtle有一条尾巴,能够放下和抬起,当尾 ...
随机推荐
- 高并发之限流RateLimiter(二)
Guava RateLimiter提供了令牌桶算法实现:平滑突发限流(SmoothBursty)和平滑预热限流(SmoothWarmingUp)实现. SmoothBursty:令牌生成速度恒定 @T ...
- 在mk/rte.app.mk 256行加echo $(O_TO_EXE_DO)查看GCC参数
在mk/rte.app.mk 256行加echo $(O_TO_EXE_DO)查看GCC参数,如:
- Flex动画效果的用法--Resize
Flex动画效果的用法--Resize FlexAdobeXML <?xml version="1.0" encoding="utf-8"?> & ...
- Merge K Sorted List(含Merge Two Sorted LIst) leetcode java
问题描述: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complex ...
- shiro中JSP标签
Shiro提供了JSTL标签用于在JSP/GSP页面进行权限控制,如根据登录用户显示相应的页面按钮. 导入标签库 <%@taglib prefix="shiro" uri=& ...
- ORACLE SQL 函数 INITCAP()
INITCAP() 假设c1为一字符串.函数INITCAP()是将每个单词的第一个字母大写,其它字母变为小写返回. 单词由空格,控制字符,标点符号等非字母符号限制. select initcap('h ...
- ORACLE-016:ora-01720 授权选项对于'xxxx'不存在
报错的情形如下, A用户:视图V_A B用户:视图V_B,并且用到了V_A C用户:需要用V_B, 授权过程, A用户下: grant select on V_A to B B用户下: grant s ...
- Hadoop---HDFS读写流程
Hadoop---HDFS HDFS 性能详解 HDFS 天生是为大规模数据存储与计算服务的,而对大规模数据的处理目前还有没比较稳妥的解决方案. HDFS 将将要存储的大文件进行分割,分割到既定的存储 ...
- Homebrew 备忘
每次都搜,写篇博客记录以备后续查看. 安装 /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew ...
- 手机验证码JQUERY实现
<!DOCTYPE html> <html> <head> <script src="http://libs.baidu.com/jquery/1. ...