Learn Recursion by Solving the Tower of Hanoi Puzzle - Step 3

I know the print call is not part of the instructions, but it does return the intended list. So I am not sure where I am wrong:

" 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) ."

Please help!

Thank you!

Your code so far


/* User Editable Region */

rods = {
    'A': list(range(3, 0, -1)),
    'B': [],
    'C': []
}
print(rods)

/* User Editable Region */

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

Challenge Information:

Learn Recursion by Solving the Tower of Hanoi Puzzle - Step 3

you are going too fast, use only the range function not the list function, that will come in a later step

2 Likes

Copy that! Thank you!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.