This is my code that draws regular polygons:
import turtle
tr = turtle.Turtle()
tr.lt(150)
for x in range(3,13):
for i in range(x):
tr.fd(80)
tr.lt(360//x)
turtle.done()
This is my output: 
But my expected output is: 
Can you help me?
source https://stackoverflow.com/questions/74810152/draw-polygon-in-polygons-regular-polygons
Comments
Post a Comment