python turtle

作者: Python_Camp | 来源:发表于2020-07-29 10:01 被阅读0次

    引用段落

    import turtle
    #turtle.forward(100)
    
    import turtle
    t = turtle.Pen()  #获得画笔
    t.hideturtle()  #隐藏海龟
    t.fillcolor("yellow")  #设置填充颜色为红色
    t.begin_fill()    #开始填充
    for x in range(1, 7):
        t.forward(100)
        t.left(60)  #在这里先向右直行,然后左转216°(左下,正五角星度数180/5=36°)
    t.end_fill()     #填充完成
    turtle.done()
    

    相关文章

      网友评论

        本文标题:python turtle

        本文链接:https://www.haomeiwen.com/subject/elxhrktx.html