用户:金钿森查看:0 回复:2 评论:0 创建时间:2020-05-23T22:09:10
import turtle
#开始进入Python的世界
Heropen = turtle.Pen()
bianshu = input("边数为?")
length = 4
for i in range(bianshu):
Heropen.forward(length)
Heropen.left((180 - ((bianshu - 2) * 180) / bianshu))
不起眼的账号帮你转换:
import turtle
#开始进入Python的世界
Heropen = turtle.Pen()
bianshu = input('边数为?')
length = 4
bianshu = int(bianshu)
for i in range(bianshu):
Heropen.forward(length)
Heropen.left((180 - ((bianshu - 2) * 180) / bianshu))
点赞0
评论