+ 4

Code repeats itself 2 times (Python)

Hello, my name is Adam. I've been working on a text based game but I've encountered a bug which I am unable to solve, I've tried looking over the code multiple times but I am unable to find the cause of the problem. The problem is in the 'def Inventory():' section, when I input A to go to the next loop then input E to exit the loop. If I try to input A it doesn't go inside the while loop, it then goes through the entire while loop again then when I input A again then it goes inside of the loop. What reason or cause is making this happen? I'd be very grateful if you could help me in solving this problem link to code - https://gist.github.com/Dinocrusher/a8ec8c0d12402eb013d66d4b62b8c69d

21st Mar 2018, 11:59 AM
Adam Hawkins
Adam Hawkins - avatar
1 Réponse
+ 2
What's the error?
22nd Mar 2018, 6:32 PM
Tomás Badenes
Tomás Badenes - avatar