Python 画多角形

2024-10-11 23:55:40

1、turtle.forward(150)turtle.right(180-180/7)turtle.forward(150)直行多少步,然后再右转多少度,180-180/7我是打算画7个角所以就用这样算式,想画多少都可以的。再直行

Python 画多角形

2、> turtle.forward(150)>>> turtle.right(180-180/7)>>稆糨孝汶;> turtle.forward(150)>>> turtle.right(180-180/7)>>> turtle.forward(150)>>> turtle.right(180-180/7)>>> turtle.forward(150)>>> turtle.right(180-180/7)>>> turtle.forward(150)>>> turtle.right(180-180/7)>>> turtle.forward(150)>>> turtle.right(180-180/7)>>> turtle.forward(150)>>>这样就画成了

Python 画多角形
猜你喜欢