on writing a while loop for rolling two dice

Michael F. Stemper michael.stemper at gmail.com
Sat Sep 4 13:27:55 EDT 2021


On 04/09/2021 08.53, Hope Rouselle wrote:
> Chris Angelico <rosuav at gmail.com> writes:

>> And at this point, it's looking pretty much identical to the for loop
>> version. Ultimately, they're all the same and you can pick and choose
>> elements from each of them.
> 
> I see.  That's why C must have added the do-while, but yeah --- it's not
> really worth it.

Kernighan and Ritchie agree(d) with you. Per _The C Programming
Language__:
   Experience shows that do-while is much less used that while
   and for.

(Second edition, Section 3.6, page 63)

-- 
Michael F. Stemper
Outside of a dog, a book is man's best friend.
Inside of a dog, it's too dark to read.


More information about the Python-list mailing list