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

Tell us what’s happening:

Actually, when I check my code in other IDE, it is working fine but it is giving me an error , it says it has not been accepted. I don’t understand what is the problem. Please provide some hints

Your code so far


# User Editable Region

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

# 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/121.0.0.0 Safari/537.36

Challenge Information:

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

Hi @Javlon,

You should be doing this in the dictionary, and should not be creating a list object.

@ateez is right, but I would like to stress on another thing: if you say something like

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

This is not an error. At the moment, errors are not visible to users in the platform. This hint is just a suggestion to help you write the required code (although in this case might not seem useful to you) and does not mean that the code you wrote is necessarily wrong.

In general, in case of syntax errors you would get the following:

Your code raised an error before any tests could run. Please fix it and try again.

This is a clear sign that the code raises an exception.