79286077

Date: 2024-12-16 21:11:35
Score: 1
Natty:
Report link

Like this? I assume, hopefully, that he meant 12 points. I added a step from 0 to 360 by 30. However it just draws the same 3 triangles from different points.

from graphics import *
from math import *

def ar(a):
    return a*3.141592654/180

def main():
    x0 = 100
    y0 = 100
    stepangle = 120
    radius = 50

    win = GraphWin()
    for startangle in range(0,360,30):
        p1 = Point(x0 + radius * cos(ar(startangle)), y0 + radius * sin(ar(startangle)))

        for i in range(stepangle+startangle,360+stepangle+startangle,stepangle):
            p2 = Point(x0 + radius * cos(ar(i)), y0 + radius * sin(ar(i)))
            Line(p1,p2).draw(win)
            p1 = p2

    input("<ENTER> to quit...")
    win.close()

main()

enter image description here

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: Andy Richter