绘制八边形

绘制八边形

使用turtle库,绘制一个八边形。‬‬

import turtle as t
t.pensize(2)
for i in range(8):
    t.fd(60)
    t.left(45)
t.done()

你可能感兴趣的:(python)