Tell us what’s happening:
I already solved the problem, but why is h negative here? I am just curious about this.
The problem involves counting down from 3 to 1. According to the instructions, range(x, y, h) is a function where x is the initial integer and that y is the final one (not inclusive). However, why is h negative if 3-2 is 1 (not negative one)?
The next number after 3 is 2. So, why does this exercise treat h as if it is 2-3 = -1?
Your code so far
# User Editable Region
rods = {
'A': [],
'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/126.0.0.0 Safari/537.36
Challenge Information:
Learn Recursion by Solving the Tower of Hanoi Puzzle - Step 3