It looks much better. But as Bruno suggests and as I alluded to earlier, you should get in the habit of forming verification loops on input channels that aren't already guaranteed to provide valid input messages. I'm not sure how to say that in English, but in python my example was:

while True:
  try:
    guess1 = int(input("\n>> "))
  except ValueError:
    print 'Bad value.'
  else:
    break


Other than that, you still have some points where you can break lines down to improve clarity. Think of it like trying to avoid run-on sentences.

Over all, it looks like you have picked up some good technique that you could only get by experimentation over the course of about 5 or 6 months.

James
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to