Using while loop and if statement to tell if a binary has an odd or even number of 1's.

Steve Holden steve at holdenweb.com
Wed Feb 4 21:58:44 EST 2009


todpose at hotmail.com wrote:
> By "binary representation", I mean a byte of 0s and 1s. Example: 00000101
> Also, I'm interested in only using while loop and if statement
> to accomplish this task.
> Thanks.
> 
I smell homework. Do it yourself!
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC              http://www.holdenweb.com/




More information about the Python-list mailing list