Vending Machine Problem In Python