1.画一组同切圆

import turtle
turtle.circle(10)
turtle.circle(20)
turtle.circle(30)
turtle.circle(40)
turtle.circle(50)

2.画一组同心圆

import turtle
turtle.up()
turtle.goto(0,0)
turtle.down()
turtle.circle(0)
turtle.up()
turtle.goto(0,-10)
turtle.down()
turtle.circle(10)
turtle.up()
turtle.goto(0,-20)
turtle.down()
turtle.circle(20)
turtle.up()
turtle.goto(0,-30)
turtle.down()
turtle.circle(30)
turtle.up()
turtle.goto(0,-40)
turtle.down()
turtle.circle(40)
turtle.up()
turtle.goto(0,-50)
turtle.down()
turtle.circle(50)

4.画一个黄色实心五角星

import turtle
turtle.shape('turtle')
turtle.color('yellow')
turtle.bgcolor('red')
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()

3.画一个五角星

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)

5.画左上角的五颗五角星

import turtle
turtle.shape('turtle')
turtle.color('yellow')
turtle.bgcolor('red')
turtle.fillcolor('yellow')
turtle.speed(10) turtle.up()
turtle.goto(-330,170)
turtle.down()
turtle.begin_fill()
turtle.forward(150)
turtle.right(144)
turtle.forward(150)
turtle.right(144)
turtle.forward(150)
turtle.right(144)
turtle.forward(150)
turtle.right(144)
turtle.forward(150)
turtle.end_fill() turtle.up()
turtle.goto(-180,220)
turtle.down()
turtle.begin_fill()
turtle.forward(40)
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.end_fill() turtle.up()
turtle.goto(-130,200)
turtle.down()
turtle.begin_fill()
turtle.forward(40)
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.end_fill() turtle.up()
turtle.goto(-130,130)
turtle.down()
turtle.begin_fill()
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.forward(50)
turtle.end_fill() turtle.up()
turtle.goto(-180,30)
turtle.down()
turtle.begin_fill()
turtle.forward(40)
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.end_fill() turtle.hideturtle()
turtle.done()

turtle库基础练习的更多相关文章

  1. turtle库的学习

          Turtle库是Python语言中一个很流行的绘制图像的函数库,想象一个小乌龟,在一个横轴为x.纵轴为y的坐标系原点,(0,0)位置开始,它根据一组函数指令的控制,在这个平面坐标系中移动, ...

  2. Turtle库学习笔记

    一.Turtle库是Python语言中一个很流行的绘制图像的函数库,想象一个小乌龟,在一个横轴为x.纵轴为y的坐标系原点,(0,0)位置开始,它根据一组函数指令的控制,在这个平面坐标系中移动,从而在它 ...

  3. turtle库笔记

    turtle库是学习python的一个重要数据库,在当下是一个很有趣流行的绘制图像的数据库,她把画笔想象为一只小乌龟在爬行,让小乌龟在一个以横轴为x,纵轴为y的画布上行驶,并且会有多样的行驶角度,速度 ...

  4. 利用 turtle库绘制简单图形

    turtle库是python的基础绘图库,这个库被介绍为一个最常用的用来介绍编程知识的方法库,其主要是用于程序设计入门,是标准库之一,利用turtle可以制作很多复杂的绘图. turtle名称含义为“ ...

  5. python学习(二)之turtle库绘图

    今天是三月七号,也就是女生节,或者女神节.不知道你是不是有自己喜欢的女孩子,在这里你可以用turtle库绘制一朵玫瑰花,送给你喜欢的姑娘.(拉到最后有惊喜哦)但在画这朵玫瑰花之前,先来一个基础的图形, ...

  6. Python绘图之Turtle库详解(1)

    Turtle库是Python语言中一个很流行的绘制图像的函数库,想象一个小乌龟,在一个横轴为x.纵轴为y的坐标系原点,(0,0)位置开始,它根据一组函数指令的控制,在这个平面坐标系中移动,从而在它爬行 ...

  7. Python画图库Turtle库详解篇

    Turtle库是Python语言中一个很流行的绘制图像的函数库,想象一个小乌龟,在一个横轴为x.纵轴为y的坐标系原点,(0,0)位置开始,它根据一组函数指令的控制,在这个平面坐标系中移动,从而在它爬行 ...

  8. turtle库元素语法分析

    一.turtle原理理解: turtle库是Python中一个有趣的图形绘制函数库.原名(海龟),我们想象一只海龟,位于显示器上窗体的正中心,在画布上游走,它游走的轨迹就形成了绘制的图形. 对于小海龟 ...

  9. Turtle库

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

随机推荐

  1. 20165336 学习基础与C语言基础调查

    20165336 技能学习心得与c语言学习 一.心得体会 做教练 从老师的健身教练健身学员的学习关系中我懂得了学生应该有自主的学习意识,要有计划地去训练.去流汗,并且要以100分的要求严于律己,老师是 ...

  2. wait()函数的详细分析

    之前一直没太深入的去理解wait()函数,今天机缘巧合之前又看了看,发现之前没有真正的理解该函数. 众所周知,wait()函数一般用在父进程中等待回收子进程的资源,而防止僵尸进程的产生. (In UN ...

  3. 【PyQt5-Qt Designer】浅谈关闭窗口

    1.关闭全部窗口(主窗口+所有的子窗口) 在逻辑界面中写入 sys.exit(0) 2.关闭子窗口(其他窗口不关闭) self.close()

  4. wc 统计命令

    [root@localhost ~]# wc /etc/passwd // 统计行数.单词数.字符数 /etc/passwd [root@localhost ~]# wc -l /etc/passwd ...

  5. 006-优化web请求二-应用缓存、异步调用【Future、ListenableFuture、CompletableFuture】、ETag、WebSocket【SockJS、Stomp】

    四.应用缓存 使用spring应用缓存.使用方式:使用@EnableCache注解激活Spring的缓存功能,需要创建一个CacheManager来处理缓存.如使用一个内存缓存示例 package c ...

  6. vue中keep_alive使用

    总结:keep-alive 是Vue的内置组件,能在组件切换过程中将状态保留在内存中,防止重复渲染DOM.结合vue-router中使用,可以缓存某个view的整个内容. 1.在App.vue中添加配 ...

  7. spring框架中的注解

  8. Spark中的partition和block的关系

    hdfs中的block是分布式存储的最小单元,类似于盛放文件的盒子,一个文件可能要占多个盒子,但一个盒子里的内容只可能来自同一份文件.假设block设置为128M,你的文件是250M,那么这份文件占3 ...

  9. 采用Extjs MVVM + ThinkPHP 架构开发的思考

    前后台号称都是MVC模式, 后台ThinkPHP框架实际上只提供web操作接口,直接返回json数据,因此只能算有Model和Controller两层, 前台ExtjsMVVM模式实际上就是分模块后的 ...

  10. php二维数组搜索

    $ar = array(     2 => array(         'catid' => 2,         'catdir' => 'notice',     ),     ...