29 lines
363 B
Python
29 lines
363 B
Python
|
|
from turtle import *
|
||
|
|
import turtle as t
|
||
|
|
|
||
|
|
n = int(input())
|
||
|
|
speed(1)
|
||
|
|
|
||
|
|
lt(90)
|
||
|
|
|
||
|
|
|
||
|
|
def uno(n):
|
||
|
|
f = n
|
||
|
|
for i in range(n):
|
||
|
|
f -= 1
|
||
|
|
fd(f)
|
||
|
|
if f != 0:
|
||
|
|
rt(90 / n)
|
||
|
|
for i in range(n):
|
||
|
|
f += 1
|
||
|
|
if f != 0:
|
||
|
|
rt(90 / n)
|
||
|
|
fd(f)
|
||
|
|
if n > 2:
|
||
|
|
rt(180)
|
||
|
|
uno(int(n / 2))
|
||
|
|
|
||
|
|
|
||
|
|
uno(n)
|
||
|
|
t.mainloop()
|