On Thu, Jul 29, 2010 at 12:22, Richard D. Moores <rdmoo...@gmail.com> wrote:
> On Wed, Jul 28, 2010 at 08:35, Richard D. Moores <rdmoo...@gmail.com> wrote:
>
> Here's my slight revision of Steven's script (see my note, lines 9-14)
> -- revised only because I wanted it to handle the case where the user
> (me) entered the interval bounds in the wrong order, e.g., 10, 5
> instead of 5, 10.  I've also added a way ('r') for the user to choose
> to get another random number in the same interval without having to
> reenter the bounds: <http://tutoree7.pastebin.com/XZ2Eek4Z>. Then I
> needed a way ('c') to choose to change the bounds after 'r' had been
> used. I used a flag (lines 42, 53, 55) to accomplish these additions.
> Was there a better way? Should I have written a couple of extra
> functions instead of using the flag? Are flags unpythonic?

So here I am talking to myself again. :)

Well, whether flags are unpythonic or not, I was finally able to get
rid of them. See <http://tutoree7.pastebin.com/qYVnhphx>

Dick
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to