slot machine algorithm python

Error