small medium large xlarge

We’re going to start posting them this week. I’ll reply here again when we’ve got some up.

hi,

The solution of the example b and c of the exercise 11 in the 7th chapter is given for the first occurrence of ‘0’ and not of ‘2’ as the announcement of the exercise is asking.

Could you please explain to me this: ‘Boolean’[0].islower(), which is the correct solution of the example d of the exersize 11 in chapter 7, because i wrote ‘Boolean’.lower().islower().

Hi Paul,

Any plans to post the complete solutions?

Cheers, I.

This is helpful. I’ve watched all the videos & kept idle running, as was recommended, to emulate what is done just as the instructors do but haven’t kept up w/ the exercises. This will allow me to study the material whenever I can.

hi, it seems that complete solutions are still missing. when are they going to be published?thank you, cheers

We just added solutions for chapters 11 and 12. The rest are in progress and we’ll keep you updated.

Just posted the solutions for chapter 15. Stay tuned for more!

Solutions for chapters 16 and 17 have been posted.

Solutions for chapters 13 and 14 have been posted.

I found the solution to chapter 12 exercise 6 confusing. As per the problem specification we simply have to arrange a series of strings according to the colors of the dutch flag. The solution provided is complex and iterates through the list, but a better solution would have been simply to count the numbers of each type of string, i.e.

``````def dutch_flag(L):

""" (list of strings) -> (list of strings)

>>> dutch_flag(['green', 'blue', 'green', 'red'])
['red', 'green', 'green', 'blue']

"""

reds = L.count('red')
greens = L.count('green')
blues = L.count('blue')

return(['red'] * reds + ['green'] * greens + ['blue'] * blues)
``````

Is that what you were looking for?

You must be logged in to comment