zoukankan      html  css  js  c++  java
  • 20190823 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()
    
    
    
    
    
    
  • 相关阅读:
    外校培训前三节课知识集合纲要(我才不会告诉你我前两节只是单纯的忘了)
    floyd算法----牛栏
    bfs开始--马的遍历
    (DP 线性DP 递推) leetcode 64. Minimum Path Sum
    (DP 线性DP 递推) leetcode 63. Unique Paths II
    (DP 线性DP 递推) leetcode 62. Unique Paths
    (DP 背包) leetcode 198. House Robber
    (贪心 复习) leetcode 1007. Minimum Domino Rotations For Equal Row
    (贪心) leetcode 452. Minimum Number of Arrows to Burst Balloons
    (字符串 栈) leetcode 921. Minimum Add to Make Parentheses Valid
  • 原文地址:https://www.cnblogs.com/fwzzz/p/11401500.html
Copyright © 2011-2022 走看看