Create a class with 2 methods:
- roll(self, pins)
The rules for scoring are as follows
- A game is 10 frames
- Each frame can have up to 2 rolls
- A spare is when you knock down all pins in a frame
You've just created a virtual vending machine that will dispense widgets of programming goodness when a user puts money into the machine. The machine should dispense the proper change. You now need the programming logic to determine which coins to dispense.
Write a program that will correctly determine the least number of coins to be given to the user such that the sum of the coins' value would equal the correct amount of change.