1.#Python的turtle绘制正六边形 

代码:

len=100     #表示边长像素
import turtle as t
#正六边形内角都是120度,外角60度
for i in range(6):
    t.left(60)
    t.fd(len)
t.done()

结果:

#使用Python的turtle绘制正六边形、叠边形


 

2、#Python123 turtle叠边形绘制

Len=150
import turtle as t
#叠边形内角为100度,外角就是80度
t.width(10)
for i in range(10):
    t.fd(Len)
    t.left(80)
t.done()

运行结果:

#使用Python的turtle绘制正六边形、叠边形

 

相关文章:

  • 2022-02-22
  • 2021-04-27
  • 2022-02-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-28
  • 2022-12-23
猜你喜欢
  • 2021-05-13
  • 2021-06-04
  • 2022-12-23
  • 2022-01-14
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案