Your task is to create a function that simulates a vending machine.
Given an amount of money (in cents ¢ to make it simpler) and a product_number, the vending machine should output the correct product name and give back the correct amount of change.
The coins used for the change are the following: [500, 200, 100, 50, 20, 10]
The return value is a dictionary with 2 properties:
product: the product name that the user selected.change: an array of coins (can be empty, must be sorted in descending order).vending_machine(products, 200, 7) ➞ { "product": "Crackers", "change": [ 50, 20, 10 ] }
vending_machine(products, 500, 0) ➞ "Enter a valid product number"
vending_machine(products, 90, 1) ➞ "Not enough money for this product"
product_number is invalid (out of range) you should return the string: "Enter a valid product number".money is not enough to buy a certain product you should return the string: "Not enough money for this product".change.