from turtle import *
n = int(textinput("Input window...", "Enter n:"))
degree = (180*(n-2))/n
for c in range(n):
forward(100)
right(180-degree)
done()
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
from turtle import *
n = int(textinput("Input window...", "Enter n:"))
degree = (180*(n-2))/n
for c in range(n):
forward(100)
right(180-degree)
done()