Back to Freecodecamp

Step 11

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

latest797 B
Original Source

--description--

Now you can remove your print() call. Then, inside the move() function, remove the pass keyword and print the content of your rods dictionary.

--hints--

You should not have print(number_of_moves) in your code.

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

You should remove the pass keyword and print the rods dictionary.

js
({ test: () => assert.match(code, /def\s+move\s*\(\s*\)\s*:\s+print\s*\(\s*rods\s*\)(?!\s*pass)/) })

--seed--

--seed-contents--

py
--fcc-editable-region--
NUMBER_OF_DISKS = 3
number_of_moves = 2**NUMBER_OF_DISKS - 1
print(number_of_moves)
rods = {
    'A': list(range(NUMBER_OF_DISKS, 0, -1)),
    'B': [],
    'C': []
}
def move():
    pass
--fcc-editable-region--