import turtle
def drawline(n):
turtle.pensize(5)
turtle.color(“red”,“orange”)
turtle.begin_fill()
for i in range(n):
turtle.forward(150)
turtle.left(360/n)
turtle.end_fill()
drawline(6)
turtle.mainloop()
2023-11-27 21:21:58
import turtle
def drawline(n):
turtle.pensize(5)
turtle.color(“red”,“orange”)
turtle.begin_fill()
for i in range(n):
turtle.forward(150)
turtle.left(360/n)
turtle.end_fill()
drawline(6)
turtle.mainloop()