Tower of Hanoi (using k peg)
Install
pip install k-peg-hanoi
Usage (hanoi {disk#} {rod#})
See hanoi --help
$ hanoi 3 3
=
===
=====
0----------------
===
===== =
1----------------
===== === =
2----------------
=
===== ===
3----------------
=
=== =====
4----------------
= === =====
5----------------
===
= =====
6----------------
=
===
=====
7----------------
$ hanoi 3 4
=
===
=====
0----------------------
===
===== =
1----------------------
===== = ===
2----------------------
= === =====
3----------------------
===
= =====
4----------------------
=
===
=====
5----------------------
$ hanoi 4 4 --text
#1 disk 1 from 0 to 1
#2 disk 2 from 0 to 3
#3 disk 3 from 0 to 2
#4 disk 2 from 3 to 2
#5 disk 4 from 0 to 3
#6 disk 2 from 2 to 0
#7 disk 3 from 2 to 3
#8 disk 2 from 0 to 3
#9 disk 1 from 1 to 3
Metadata
Release files for k-peg-hanoi 0.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| k_peg_hanoi-0.2.5-py3-none-any.whl | Python 3 | none | any | Details |
Release files / k_peg_hanoi-0.2.5-py3-none-any.whl
| Download URL | k_peg_hanoi-0.2.5-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
11d6e8f6fbf55ee810274e45fc5b74b667fe3783b15a723b3a137dd74d414faa
|
|
BLAKE2b-256 checksum How to use checksums |
485af5088c78dc56c7de4cfb3720c8ade7dbb1fc96fc6249f21c7ca0ccc5424f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|