mboblop
December 30, 2024, 1:33am
1
Tell us what’s happening:
Is the problem the range or another issue?
I have tried all of these in the ( )
3,0,1
3,0,-1
3,1,1
3,1,-1
Your code so far
# User Editable Region
rods = {
'A': [range(3,1,1)],
'B': [],
'C': []
}
# 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/131.0.0.0 Safari/537.36
Challenge Information:
Learn Recursion by Solving the Tower of Hanoi Puzzle - Step 3
Teller
December 30, 2024, 1:42am
2
Hi @mboblop
Here is a post you may find helpful.
Happy coding
1 Like
mboblop
December 30, 2024, 1:49am
3
This was the solution, had to add new line of code instead of editing the code inside the bracket.
rods = {
‘A’: ,
‘B’: ,
‘C’:
}
rods[‘A’]= range(3, 0,-1)
mboblop
December 30, 2024, 1:53am
4
Thanks, I understood logic of the range (3,0,-1) but It wasn’t working inside that bracket, therefore I had use the correct range on the new line code.
Teller
December 30, 2024, 3:24am
5
It can work inside rods
if you remove the brackets.