Back to Freecodecamp

Step 10

curriculum/challenges/english/blocks/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dc963d866fff3dd0329993.md

latest587 B
Original Source

--description--

Print the variable you declared in the previous step and feel free to change the number of disks to see how fast the required minimum number of moves increases.

--hints--

You should print the number_of_moves variable.

js
({ test: () => assert.match(code, /print\s*\(\s*number_of_moves\s*\)/) })

--seed--

--seed-contents--

py
--fcc-editable-region--
NUMBER_OF_DISKS = 3
number_of_moves = 2**NUMBER_OF_DISKS - 1

--fcc-editable-region--
rods = {
    'A': list(range(NUMBER_OF_DISKS, 0, -1)),
    'B': [],
    'C': []
}

def move():
    pass