On 09/21/2012 09:36 AM, echo.hp...@gmail.com wrote:
> may i know how to shift the bits using only looping and branching??

Yes, show us your code, and what isn't working, and we'll try to help
you complete the assignment.  It'd probably also be good to specify the
rest of the homework, like what version of what language it has to be
implemented in.

I don't see any bits, only strings of characters.  And it seems to me
that using slices is the most obvious mechanism for rotating
fixed-length strings.


> x....x
> .x..x.
> ..xx..
> ..xx..
> .x..x.
> x....x
>
> xx....
> ..x..x
> ...xx.
> ...xx.
> ..x..x
> xx....
>
> .xx...
> x..x..
> ....xx
> ....xx
> x..x..
> .xx...
>
> etc..

-- 

DaveA

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

Reply via email to