画一组同切圆

输入

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的更多相关文章

  1. Python Turtle

    之前对这个turtle这个模块不了解,觉得没什么意思,最近试了一下发现不错,来点最简单的.写的时候深刻感受到自己智商是个硬伤,算角度都算了半天... 图就不导了吧,懒癌晚期... import tur ...

  2. Turtle Online:致力于打造超接地气的PC前端架构,组件+API,快速搭建前端开发

    架构创作初衷 每当新开一个项目时,都会绞尽脑汁去考虑采用哪种框架:requirejs/seajs.jquery/zepto.backbone.easeUI/Bootstrap/AngularJS……, ...

  3. Turtle库

    下列turtle库的简单常用指令 forward(distance) #将箭头移到某一指定坐标 left(angel) right(angel) penup() #提起笔,用于另起一个地方绘制时 ...

  4. python turtle,random,math

    # List imports here: import turtle import random import math # List constants here (NO MAGIC NUMBERS ...

  5. CodeForces 132C Logo Turtle (记忆化搜索)

    Description A lot of people associate Logo programming language with turtle graphics. In this case t ...

  6. 10分钟轻松学会python turtle绘图

     1. 画布(canvas) 1.1 相关函数: 2. 画笔 2.1 画笔的状态 2.2 画笔的属性 2.3 绘图命令 3. 命令详解 4. 绘图举例 4.1 太阳花 4.2 绘制小蟒蛇 4.3 绘 ...

  7. Python输入输出练习,运算练习,turtle初步练习

    Hello World! 简单交互(交互式,文件式)教材P19 radius=25 area=3.1415*radius*radius print(area) print('{:.2f}'.forma ...

  8. python绘制图形(Turtle模块)

    用python的Turtle模块可以绘制很多精美的图形,下面简单介绍一下使用方法. 需要用到的工具有python,python 的安装这里就不再细说.自行搜索. from turtle import ...

  9. python中的turtle库绘制图形

    1. 前奏: 在用turtle绘制图形时,需要安装对应python的解释器以及IDE,我安装的是pycharm,在安装完pycharm后,在pycharm安装相应库的模块,绘图可以引入turtle模块 ...

  10. Python中的turtle初探

    turtle Python自带了一个turtle库,就像名字turtle说的那样,你可以创建一个turtle,然后这个turtle可以前进,后退,左转,这个turtle有一条尾巴,能够放下和抬起,当尾 ...

随机推荐

  1. 池建强 Mac Tips

    摘自<MacTalk 人生元编程>,原文有130条,从中摘录出7条:大部分与  Terminal 相关 1. 终端说英语 在终端输入 " say hello" ,Mac ...

  2. type convert

    背景# 在开发中,我们会碰到诸如String类型转换为Int等等问题,虽然处理起来简单,但是本着DRY(Don't Repeat Yourself )原则,还是有必要封装处理下: 具体代码:Maste ...

  3. tomcat ----> 启动,关闭和配置等等

    1.启动 在tomcat安装目录的bin文件中双击startup.bat. 2.关闭 在tomcat安装目录的bin文件中双击shutdown.bat. 3.配置tomcat-user.xml文件 ( ...

  4. 完整的Django入门指南学习笔记4

    前言 这一章节将会全面介绍 Django 的身份认证系统,我们将实现注册.登录.注销.密码重置和密码修改的整套流程. 同时你还会了解到如何保护某些试图以防未授权的用户访问,以及如何访问已登录用户的个人 ...

  5. csrf漏洞

    漏洞原理:csrf全名为跨站请求伪造,是一种对网站的恶意利用,虽然听起来和xss很像,但是它们俩还是有很大的区别的.csrf是通过伪造来自受信任用户的请求来利用受信任的网站. 比如: 一个有csrf漏 ...

  6. ACM-ICPC World Finals 2019 G.First of Her Name

    题意:给一颗字典树,m次查询,每次给出一个字符串,问你该字符串是字典树上多少串的后缀 题解:字典树求广义sam,每次把查询串在sam上跑一遍,最后到达的点的sz就是答案,中途没法走了,就是没有出现过 ...

  7. shiro中SSL

    对于SSL的支持,Shiro只是判断当前url是否需要SSL登录,如果需要自动重定向到https进行访问. 首先生成数字证书,生成证书到D:\localhost.keystore 使用JDK的keyt ...

  8. c++中利用localtime_s函数格式化输出当地日期与时间

    Visual C++ 6.0开发环境中显示当地日期与时间主要通过localtime()函数来实现,该函数的原型在time.h头文件中,其语法格式如下: struct tm *localtime(xon ...

  9. hpu_newoj_1028-exgcd

    The Elevator   描述 全是电梯. Philo正处于高度为0的一个平台上,在他面前的一个平面,全是上上下下的电梯. Philo想要离开这里,请你帮帮他. 电梯世界规则:这里的电梯所能到达的 ...

  10. 移除input框type="number"在部分浏览器的默认上下按钮

    input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none !impor ...