MCPcopy Create free account
hub / github.com/geekcomputers/Python / Python Program for Tower of Hanoi.py

File Python Program for Tower of Hanoi.py

Python Programs/Python Program for Tower of Hanoi.py:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1# Recursive Python function to solve the tower of hanoi
2def TowerOfHanoi(n, source, destination, auxiliary):
3 if n == 1:
4 print("Move disk 1 from source ", source, " to destination ", destination)

Callers

nothing calls this directly

Calls 1

TowerOfHanoiFunction · 0.85

Tested by

no test coverage detected