curriculum/challenges/english/blocks/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64dc8ea01436383a88256d7f.md
The puzzle starts with the disks piled up on the first rod, in decreasing size, with the smallest disk on top and the largest disk on the bottom. You need to populate your first list with numbers representing the various disk sizes.
Instead of adding the items manually to the first list, generate a sequence of numbers counting down from 3 to 1 by using the range() function and assign it to rods['A']. Here, 3 represents the largest disk at the bottom of the pile and 1 represents the smallest disk at the top of the pile.
The syntax is range(x, y, h), where x is the starting integer (inclusive), y is the last integer (not inclusive), and h is the difference between a number and the next one in the sequence.
You should use the range() function to assign a sequence of numbers to rods['A']. The syntax for calling the range() function is range(x, y, h).
({ test: () => assert(runPython(`
type(rods['A']) is range
`))
})
You should use the range() function to assign the sequence of numbers from 3 to 1 to rods['A'].
({ test: () => assert(runPython(`
rods['A'] == range(3, 0, -1)
`))
})
--fcc-editable-region--
rods = {
'A': [],
'B': [],
'C': []
}
--fcc-editable-region--