21 lines
283 B
Python
21 lines
283 B
Python
#!/usr/bin/python3
|
|
|
|
import turtle
|
|
|
|
|
|
# The sum of the inner angles of a polygon
|
|
# in an euclidian plane:
|
|
n = 7
|
|
inner_angle_sum = (n - 2) * 180
|
|
|
|
# Distance between two vertices
|
|
l = 70
|
|
|
|
|
|
|
|
for i in range(n):
|
|
turtle.forward(l)
|
|
turtle.right(180 - inner_angle_sum / n)
|
|
|
|
turtle.mainloop()
|