Sep-09-2018, 11:02 PM
You can debug your code by adding
If you do that, you will see the output:
print('Current state:', y, y-1)
after while
loop declaration. If you do that, you will see the output:
Output:4 3
12 11
132 131
17292 17291
298995972 298995971
Tip: the counter, variable d, does not affect on variable y
that accumulates the result. So, you need to do some changes in line 5 and probably line 3 of your code.