zoukankan      html  css  js  c++  java
  • Python基础综合练习

    import turtle
    
    def mygoto(x,y,z):
        turtle.up()
        turtle.goto(x,y)
        turtle.setheading(z)
        turtle.down()
    
    
    def wjx(x):
        turtle.begin_fill()
        for i in range(5):
            turtle.forward(x)
            turtle.right(144)
        turtle.end_fill()
    
    turtle.setup(600,400,0,0)
    turtle.color("green")
    turtle.bgcolor("black")
    turtle.fillcolor("green")
    
    mygoto(-250,75,0)
    wjx(120)
    
    mygoto(-100,150,305)
    wjx(40)
    
    mygoto(-50,100,30)
    wjx(40)
    
    mygoto(-50,25,5)
    wjx(40)
    
    mygoto(-100,-25,300)
    wjx(40)
    
    turtle.done()
    

      

    
    
  • 相关阅读:
    poj1581
    poj3094
    poj2196
    poj1003
    poj2262
    poj1083
    poj3299
    poj2739
    poj1552
    js 获取元素高度和宽度
  • 原文地址:https://www.cnblogs.com/18128319239F/p/8600792.html
Copyright © 2011-2022 走看看