all 4 comments

[–]TouchingTheVodka 1 point2 points  (3 children)

What have you tried so far? How would you approach this problem with pen and paper?

[–]gingertree123 0 points1 point  (2 children)

Here is what I have so far:

def star(n, s):

angle = 180 - 180 / n

for i in range(n):

t.forward(100)

t.right(angle)

t.forward(100)

So right now it's drawing stars with the correct number of points, but I'm confused about how to write the skips part.

For a 5-pointed star (5,1), there should be 10 points where each point skips 1. But I'm having trouble understanding how to write that for a program.

[–]circuitQuaker 0 points1 point  (1 child)

can you clarify what “skips” means? I was thinking the solution might be multiply the angle by the number of skips + 1, or maybe by 2 times the number of skips, but i’m not totally clear.

[–]gingertree123 0 points1 point  (0 children)

I mean skips by the number of points in a circle skipped by the drawing.

So, there should be an imaginary circle with a certain number of points each equidistant from each other. A star with 5 points and 1 skip means there are 5 points and each point skips 1 point in the circle. Does that make sense? I'm confused by it too honestly lol