Hello, I'm a high school student and I just started learning Python.
I'd really appreciate some help on some problems I've been assigned, and some tips that could help me out in the future with problems like these.
>>> getLeaves ( jenny )
[5,3,0,9]
>>>
>>> getLeaves ( joshua )
[15,17,19,11,13]
Find all length n strings of Xs and Os without consecutive Os. Hint: find the length (n-1) strings and attach an add'l X or O when you can. map and filter might be useful. The order doesn't matter.
>>> xox(0)
>>>
>>> xox(1)
>>>
>>> xox(2)
>>>
>>> xox(3)
>>>
>>> xox(4)
Thanks!