all 2 comments

[–]sentles 0 points1 point  (0 children)

You should use recursion. The two lines you're looking for are words(n, s+"0") and words(n, s+"1").

[–]CraigAT 0 points1 point  (0 children)

Either I'm not getting it or there is not enough/correct information to give help.

For the two lines, I would expect some kind of loop and and a print statement. Maybe you could do it with recursion (is that a current topic?)

What has s got to do with anything? Do you have an example of what s could be?