day 03 turtle 画鹅
turtle 画鹅
import turtle
t=turtle
turtle.speed(10)
t. setup(800,600)
#画头
turtle.penup()
turtle.goto(0,100)
turtle.pendown()
turtle.pensize(20)
turtle.fillcolor('black')
turtle.begin_fill()
turtle.circle(80,360)
turtle.end_fill()
#画肚子
turtle.up()
turtle.goto(-70,130)
# turtle.pencolor("red") #找画笔
turtle.seth(-125)
turtle.pendown()
turtle.pensize(10)
turtle.circle(300,60)
turtle.up()
turtle.goto(70,130)
# turtle.pencolor("red")
turtle.down()
turtle.circle(-320,60)
# turtle.pencolor("red")
turtle.seth(-180)
turtle.circle(-450,18)
#画脚
turtle.up()
turtle.pencolor("yellow")
turtle.seth(-100)
turtle.pendown()
turtle.fillcolor("yellow")
turtle.begin_fill()
turtle.fd(50)
turtle.seth(30)
turtle.fd(63)
turtle.end_fill()
turtle.seth(0)
turtle.up()
turtle.fd(50)
turtle.seth(-70)
turtle.pendown()
turtle.fillcolor("yellow")
turtle.begin_fill()
turtle.fd(50)
turtle.seth(60)
turtle.fd(50)
turtle.end_fill()
turtle.up()
#画手
turtle.goto(125,30)
turtle.down()
turtle.pencolor("black")
turtle.seth(-65)
turtle.pensize(50)
turtle.fd(100)
turtle.up()
turtle.goto(-135,30)
turtle.down()
turtle.seth(-120)
turtle.fd(100)
turtle.up()
#围巾
turtle.goto(-70,120)
turtle.seth(-60)
turtle.down()
turtle.pencolor("red")
turtle.pensize(20)
turtle.circle(80,125)
#画眼
turtle.up()
turtle.goto(-20,190)
turtle.down()
turtle.pencolor("white")
turtle.pensize(3)
turtle.fillcolor('white')
turtle.begin_fill()
turtle.circle(20,360)
turtle.end_fill()
turtle.up()
turtle.goto(60,190)
turtle.down()
turtle.fillcolor('white')
turtle.begin_fill()
turtle.circle(20,360)
turtle.end_fill()
#画眼珠子
turtle.pencolor("black")
turtle.up()
turtle.goto(40,200)
turtle.down()
turtle.pensize(3)
turtle.circle(1,360)
turtle.up()
turtle.goto(-40,200)
turtle.down()
turtle.circle(1,360)
#画嘴
turtle.up()
turtle.goto(-35,160)
turtle.down()
turtle.pencolor("yellow")
turtle.seth(0)
turtle.fillcolor('yellow')
turtle.begin_fill()
turtle.fd(80)
turtle.seth(-145)
turtle.fd(50)
turtle.seth(145)
turtle.fd(50)
turtle.end_fill()
turtle.up()
turtle.goto(200,200)
turtle.done()
day 03 turtle 画鹅的更多相关文章
- python运用turtle 画出汉诺塔搬运过程
python运用turtle 画出汉诺塔搬运过程 1.打开 IDLE 点击File-New File 新建立一个py文件 2.向py文件中输入如下代码 import turtle class Stac ...
- python3 turtle 画国际象棋棋盘
python3 turtle 画国际象棋棋盘 #!/usr/bin/env python # -*- coding:utf-8 -*- # Author:Hiuhung Wan import turt ...
- *【Python】【demo实验31】【练习实例】【使用turtle画小猪佩奇】
如下图小猪佩奇: 要求使用turtle画小猪佩奇: 源码: # encoding=utf-8 # -*- coding: UTF-8 -*- # 使用turtle画小猪佩奇 from turtle i ...
- 【Python】【demo实验29】【练习实例】【使用turtle画五角星】
原题: 使用turtle画五角星: 我的代码: #!/usr/bin/python # encoding=utf-8 # -*- coding: UTF-8 -*- from turtle impor ...
- 使用turtle画故宫(伍奇,侯俊豪小组)
这个代码主要有两个部分,第一部分是画出故宫,第二部分是用random函数随机画心,故宫部分设置多个函数和循环再进行颜色填充即可完成. 此处为视频链接 from turtle import* impor ...
- 用python turtle画玫瑰
1.turtle 库 2.画玫瑰的代码: import turtle turtle.penup() turtle.left() turtle.fd() turtle.pendown() turtle. ...
- Python之turtle画同心圆和棋盘
画饼图 import turtle t = turtle.Pen() for i in range(5): t.penup() t.goto(0, -i*30) t.pendown() t.circl ...
- 用python的turtle画分形树
由于分形树具有对称性,自相似性,所以我们可以用递归来完成绘制.只要确定开始树枝长.每层树枝的减短长度和树枝分叉的角度,我们就可以把分形树画出来啦!! 代码如下: # -*- coding: utf-8 ...
- python 用turtle 画小猪佩奇
from turtle import * def nose(x,y):#鼻子 penup()#提起笔 goto(x,y)#定位 pendown()#落笔,开始画 setheading(-30)#将乌龟 ...
随机推荐
- Matlab绘制阶梯形图
声明:引用请注明出处http://blog.csdn.net/lg1259156776/ 对于Matlab的使用情况常常是这样子的,很多零碎的函数名字很难记忆,经常用过后过一段时间就又忘记了,又得去网 ...
- 最新 新浪java校招面经 (含整理过的面试题大全)
从6月到10月,经过4个月努力和坚持,自己有幸拿到了网易雷火.京东.去哪儿.新浪等10家互联网公司的校招Offer,因为某些自身原因最终选择了新浪.6.7月主要是做系统复习.项目复盘.LeetCode ...
- rebbitMQ的实现原理
引言 你是否遇到过两个(多个)系统间需要通过定时任务来同步某些数据?你是否在为异构系统的不同进程间相互调用.通讯的问题而苦恼.挣扎?如果是,那么恭喜你,消息服务让你可以很轻松地解决这些问题.消息服务擅 ...
- 关于iframe的一些使用
在iframe页面,获取当前iframe的id var iframeId = window.frameElement.id.toString(); 获取父窗口中另一个iframe的iframe,注意返 ...
- redis 持久化 ——RDB
文章目录 RDB 关于 fork dump.rdb 文件 如何触发 RDB 快照 如何恢复 优势 劣势 停掉 RDB RDB redis database 的简写 : 在指定时间间隔后,将内存中的数据 ...
- web 系统发展历程
文章目录 web系统的发展历程 ------- **单机`mysql`的美好年代** ------ **Memcached(缓存)+Mysql+垂直拆分** ------ **mysql 主从读写分离 ...
- VC++实现遍历指定文件夹
VC++实现遍历指定文件夹,并进行深度遍历,一级,二级...最终列出该文件夹下所有文件全路径. #include "stdafx.h" #include <iostream& ...
- PAT甲级 排序题_C++题解
排序题 PAT (Advanced Level) Practice 排序题 目录 <算法笔记> 6.9.6 sort()用法 <算法笔记> 4.1 排序题步骤 1012 The ...
- Scrapy各部分运行机制?Xpath为None?多层Response如何编写?搞定Scrapy的坑
前言 Scrapy那么多模块都是怎么结合的啊?明明在chrome上的xpath helper插件写好了xpath,为什么到程序就读取的是None?Scrapy可以直接写多层response么?难道必须 ...
- PAT-1015 Reversible Primes (20 分) 进制转换+质数
A reversible prime in any number system is a prime whose "reverse" in that number system i ...