how to do draw pattern with python?

Dave Angel d at davea.name
Fri Sep 21 10:00:33 EDT 2012


On 09/21/2012 09:36 AM, echo.hping at 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




More information about the Python-list mailing list