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)#将乌龟 ...
随机推荐
- ELK优化难题解决
你头疼的ELK难题,本文几乎都解决了 一.ELK实用知识点总结 1.编码转换问题 这个问题,主要就是中文乱码. input中的codec=>plain转码: codec => plain ...
- rest_framework之三种分页器使用方法
from rest_framework.pagination import PageNumberPagination,LimitOffsetPagination,CursorPagination ...
- rebbitMQ的实现原理
引言 你是否遇到过两个(多个)系统间需要通过定时任务来同步某些数据?你是否在为异构系统的不同进程间相互调用.通讯的问题而苦恼.挣扎?如果是,那么恭喜你,消息服务让你可以很轻松地解决这些问题.消息服务擅 ...
- vue-cli开发-搭建项目(一)
前言 vue-cli是Vue官方提供的命令行工具,可用于快速搭建大型单页应用.集成了webpack环境及主要依赖,对于项目的搭建.打包.维护管理等都非常方便快捷.建议先熟悉 Vue 本身之后再研究 C ...
- 用css美化select框
先上代码: .selectData{ height: 0.42rem; position: absolute; right:.28rem; top:.30rem; //去边框 border: none ...
- Python3的内置函数介绍
Python3的官网链接:https://docs.python.org/3/library/functions.html?highlight=built#ascii 内置函数介绍 abs 绝对值函数 ...
- S03_CH06_AXI_VDMA_OV7725摄像头采集系统
S03_CH06_AXI_VDMA_OV7725摄像头采集系统 本课程将对Xilinx提供的一款IP核--AXI VDMA(Video Direct Memory Access) 进行详细讲解,为后续 ...
- Lucene全文检索_分词_复杂搜索_中文分词器
1 Lucene简介 Lucene是apache下的一个开源的全文检索引擎工具包. 1.1 全文检索(Full-text Search) 1.1.1 定义 全文检索就是先分词创建索引,再执行搜索的过 ...
- 2019杭电多校二 L. Longest Subarray (线段树)
大意: 给定序列$a$, 元素范围$[1,C]$, 求一个最长子序列, 满足每个元素要么不出现, 要么出现次数$\le K$. 枚举右端点, 考虑左端点合法的位置. 显然一定是$C$种颜色合法位置的交 ...
- BZOJ3879 SvT(后缀树+虚树)
对反串建SAM得到后缀树,两后缀的lcp就是其在后缀树上lca的len值,于是每次询问对后缀树建出虚树并统计答案即可. #include<iostream> #include<cst ...