Home > other >  For help
For help

Time:10-21

Written in Python2.7.15 Hanoi program, which requires the output Hanoi as the result of 7 layers

CodePudding user response:

What a result, the mobile number?

CodePudding user response:

reference 1st floor max5173 response:
what results, mobile number?

Is displayed in his environment

CodePudding user response:

 
# Hanoi
Def Hanoi (n, a, b, c) :
If n==1:
Print (a, '-- & gt; ', c)
The else:
Hanoi (n - 1, a, c, b)
Print (a, '-- & gt; ', c)
Hanoi (n - 1, b, a, c)


Hanoi (7, 'A', 'B', 'C')
  • Related