Towers of Hanoi: Difference between revisions

m
→‎Python Graphic: (repositioned captions)
(→‎Python Graphic: Added caption texts to simple ascii diagrams)
m (→‎Python Graphic: (repositioned captions))
Line 3,546:
)(rods))
)
return tpl[3] + '\n\n' + unlines(xs) + '\n' + ('_' * 3 * w) + '\n' + tpl[3] + (
'\n' * 2
)
 
 
Line 3,677 ⟶ 3,675:
main()</lang>
<pre>Hanoi sequence for 3 disks:
 
 
__
Line 3,682 ⟶ 3,681:
______
________________________
left -> right</pre>
 
 
 
____
______ __
________________________
left -> rightmid
 
 
______ ____ __
________________________
leftright -> mid
 
 
__
______ ____
________________________
rightleft -> midright
 
 
__
____ ______
________________________
leftmid -> rightleft
 
 
__ ____ ______
________________________
mid -> leftright
 
 
____
__ ______
________________________
midleft -> right
 
 
__
____
______
________________________</pre>
left -> right</pre>
 
==={{libheader|VPython}}===
9,659

edits