I&#39;m a bad fan of Nick Parlante teaching style. He has a excellent site that has some exercises to teach Python, and they are backed with unittests.<div><a href=" http://codingbat.com/python">http://codingbat.com/python </a></div>
<div><br><div class="gmail_quote">On Mon, Jun 11, 2012 at 11:05 AM, brian arb <span dir="ltr">&lt;<a href="mailto:brianjamesarb@gmail.com" target="_blank">brianjamesarb@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div>I would look into pylint, <span style="font-size:12px;font-family:&#39;Trebuchet MS&#39;,Tahoma,Verdana,Arial,sans-serif">Python source code looking for bugs and signs of poor quality.</span></div>
<div class="im">
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There are, unfortunately, no answers nor examples of good and bad code.  Honestly I don’t want to “cheat” but I have to teach Python to some young students in September, using this book, and I want all the responses to any doubts they have ready .....<br>


<br></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Here’s something specific:<br>
chapter 8 challenge 2:  “ Write a program that simulates a television by creating it as an object. The user should be able to enter a channel number and raise or lower the volume.  Make sure that the channel number and volume level stay within valid ranges.”</blockquote>

<div><br></div></div><div>Highly recommend writing unittest,<span style="line-height:20px;font-family:arial,helvetica,sans-serif"> each unit test sends a specific input to a method and verifies that the method returns the expected value, or takes the expected action. Unit tests prove that the code you are testing does in fact do what you expect it to do.</span></div>

</div>
</blockquote></div><br></div>