curriculum/challenges/english/blocks/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64de4bccf5becb208a48ca97.md
In the Tower of Hanoi puzzle, you can identify the three rods according to their purpose:
Currently, the move() function does not take any parameters. Change the function declaration to take 4 parameters: n, source, auxiliary, and target. Then, pass NUMBER_OF_DISKS and the strings 'A', 'B', and 'C' as arguments to your function call. The order matters.
Your move() function should have n, source, auxiliary, and target as the parameters. The order matters.
({ test: () => assert(runPython(`
import inspect
str(inspect.signature(move)) == '(n, source, auxiliary, target)'
`))
})
You should pass NUMBER_OF_DISKS and the strings 'A', 'B', and 'C' to move(). The order matters.
({test: () => assert.match(code, /^move\(\s*NUMBER_OF_DISKS\s*,\s*('|")A\1\s*,\s*('|")B\2\s*,\s*('|")C\3\s*\)/m)
})
NUMBER_OF_DISKS = 3
number_of_moves = 2**NUMBER_OF_DISKS - 1
rods = {
'A': list(range(NUMBER_OF_DISKS, 0, -1)),
'B': [],
'C': []
}
--fcc-editable-region--
def move():
print(rods)
move()
--fcc-editable-region--