This code doesn't work out of the box. The core logic is fine though, you can make it work if you know Python. I did it that way to prevent kids from misusing it.