久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網
      最全最豐富的資訊網站

      python繪制正方形螺旋線

      本篇文章介紹了python中使用turtle庫繪制正方形螺旋線的方法,代碼很簡單,希望對正在學習python中的同學有幫助!

      python繪制正方形螺旋線

      python繪制正方形螺旋線

      使用python繪制螺旋形,使用了turtle庫,這是python2.6版本中后引入的一個簡單的繪圖工具,叫做海龜繪圖(Turtle Graphics),turtle庫是python的內部庫,使用時導入即可。

      import turtle as t t.pen(speed=0)   #加快繪圖速度 t.penup() t.goto(-200, -200)     #以左下角某處為起點 t.pendown() t.seth(0) length = 400 while (length !=0):    #利用正方形螺旋線的性質來繪圖     t.fd(length)     t.left(90)     length -= 2.5 t.hideturtle()         #繪圖結束后把海龜頭(筆觸頭)隱藏起來 t.done()               #繪圖結束后使窗口停留

      效果圖

      python繪制正方形螺旋線

      贊(0)
      分享到: 更多 (0)
      網站地圖   滬ICP備18035694號-2    滬公網安備31011702889846號