On Jun 26, 8:01 pm, Paul Moore wrote:
> 2009/6/26 Udyant Wig :
>
>
>
>
>
> > I implemented this ->http://www.apl.jhu.edu/~hall/lisp/Hanoi.lispin
> > both flavors of Python: 2.6.2 and 3.0.1 (CPython)
>
> > The code:
> > #!/usr/bin/env python
> >
On Jun 26, 7:14 pm, Stefan Behnel wrote:
> Udyant Wig wrote:
> > I implemented this ->http://www.apl.jhu.edu/~hall/lisp/Hanoi.lispin
> > both flavors of Python: 2.6.2 and 3.0.1 (CPython)
>
> > The code:
> > #!/usr/bin/env python
> > def remaining_peg (peg1
I implemented this -> http://www.apl.jhu.edu/~hall/lisp/Hanoi.lisp in
both flavors of Python: 2.6.2 and 3.0.1 (CPython)
The code:
#!/usr/bin/env python
def remaining_peg (peg1, peg2):
return (6 - peg1 - peg2)
def hanoi (num_discs, start, end):
if (1 == num_discs):