Skip to content
Advertisement

Tag: while-loop

Python: vending machine

The program offers items, has the user pay for items, gives the items, and updates the stock of each item. It seems to work more or less. I have 2 questions: I don’t know how to exit the vending machine program after the user answers “n” to “buy something else? (y/n): “. Is there a way to make the code

Advertisement