### Tell us what’s happening:

Not getting what I’m supposed to do here at all. Not sure how “powers” work, I’ve tried

2**2,**

2-1,

2*2*,

2.2**,

etc.

### Your code so far

```
# User Editable Region
NUMBER_OF_DISKS = 3
number_of_moves = 2**-1
# User Editable Region
rods = {
'A': list(range(NUMBER_OF_DISKS, 0, -1)),
'B': [],
'C': []
}
def move():
pass
```

### 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 Edg/120.0.0.0`

### Challenge Information:

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

Teller
2
Hi @Mikie22

The value of number_of_moves should be the expression to calculate the number of moves.

The expression given is 2^{n}-1

Where is the `n`

part?

Happy coding

number_of_moves = 2**n-1

NameError: name ‘n’ is not defined

Still lost:

NUMBER_OF_DISKS = 3

n = disks(2)

number_of_moves = disks(-1)

Teller
6
So the formula you are given is 2^{n}-1

How would you work out the number of moves if the number of disks is 6?

number_of_moves = 2*3-1

number_of_moves = 5

number_of_moves = 6-1

Teller
8
To add a power to a number you use **

For example 2^{6} in Python is `2**6`

1 Like