Question: def hanoiMoves ( n , frm , to , extra ) : if n = = 1 : print ( f Move disk 1
def hanoiMovesn frm to extra:
if n :
printfMove disk from frm to to
return
moves
moves hanoiMovesn frm extra, to
printfMove disk n from frm to to
moves
moves hanoiMovesn extra, to frm
printVerification of the number of moves:"
for i in range:
count hanoiMovesiACB
countmoves i
assert count countmoves, fError for n i: Got count moves, expected countmoves
printVerification successful: Number of moves matches n for n from to
keep getting this error:
count hanoiMovesiACB
countmoves i
assert count countmoves, fError for n i: Got count moves, expected countmoves
printVerification successful: Number of moves matches n for n from to
AssertionError: Error for n : Got moves, expected
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
