Лого!!1

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# -*- coding: utf-8 -*-
import math
import turtle
def regular_polygon(x, y, radius, angles):
for i in range(0, angles+1):
xi = x + radius*math.cos((2*math.pi*i)/angles)
yi = y + radius*math.sin((2*math.pi*i)/angles)
yield (xi, yi)
if __name__ == "__main__":
turtle.reset()
turtle.speed("fastest")
for pos in regular_polygon(0, 0, 100, 3):
turtle.goto(pos[0], pos[1])
turtle.goto(0, 0)
turtle.goto(pos[0], pos[1])
turtle.done()