Let s = the sidelength.
So the perimeter of the star is 5(2s) = 10*s
Radius, R, of the circle circumscribing the whole star is
R = s*cos(18deg) +s*sin(18deg)tan(54deg)
R = (1.37638)*s
"Wing" length, or from one vertex to another vertex, l, is
L = s +2*s*sin(18deg) +s
L = (2.61803)*s
Then, a shortcut, divide the circumscribing circle into 5 equal arcs. So one arc is 360/5 = 72 degrees long. Or the central angle of each arc is 72 degrees.
Then draw chords to connect those 5 points on the circumference.
You think you can program now the 5-pointed star?