zoukankan      html  css  js  c++  java
  • 画一个五星红旗

    import turtle
    turtle.fillcolor("yellow")
    turtle.bgcolor("red")
    turtle.color("yellow")
    #大星星
    turtle.up()
    turtle.goto(-600,200)
    turtle.begin_fill()
    for i in range(5):
        turtle.forward(200)
        turtle.right(144)
    turtle.end_fill()
    
    #第一颗小星星
    turtle.up()
    turtle.goto(-300,300)
    turtle.begin_fill()
    turtle.left(30)
    for i in range(5):
        turtle.forward(45)
        turtle.right(144)
    turtle.end_fill()
    
    #第二颗小星星
    turtle.up()
    turtle.goto(-260,220)
    turtle.begin_fill()
    turtle.left(12)
    for i in range(5):
        turtle.forward(45)
        turtle.right(144)
    turtle.end_fill()
    
    #第三颗小星星
    turtle.up()
    turtle.goto(-200,130)
    turtle.begin_fill()
    turtle.left(170)
    for i in range(5):
        turtle.forward(45)
        turtle.right(144)
    turtle.end_fill()
    
    #第三颗小星星
    turtle.up()
    turtle.goto(-300,30)
    turtle.begin_fill()
    turtle.left(170)
    for i in range(5):
        turtle.forward(45)
        turtle.right(144)
    turtle.end_fill()

    效果如下:

  • 相关阅读:
    Handling Touches
    Learn the Basics
    Getting started
    (dev mode) install CONSUL on ubuntu
    Resilience4j usage
    spring cloud gateway
    courator
    courator
    js 获取服务器控件
    js
  • 原文地址:https://www.cnblogs.com/garxiu/p/7506651.html
Copyright © 2011-2022 走看看