Develop psuedocode to control operation of vending machine

The ACME Company has approached you with a request to develop the psuedocode that will control the operations of their new series of vending machines. The program will be required to maintain the product inventory and money reservoir. The program should do the following operations:
1. Take as input an item number and money (The program terminates when a user enters a negative money amount and “000” as an item number.)
2. Check to see if the item exists. (if it doesn’t give the user a chance to re-enter the number)
3. Check to see if the money is sufficient enough to pay for item. (If not request more money)
4. Check to see if item is in stock. (If not user should be notified with the choice of selecting new item or cancelling the order)
5. If the item is in stock and the money is sufficient, the program should provide change and update the money reservoir and product inventory.
6. When the dispensing change, the program must insure that it always returns the correct amount of change based on the coins available in the reservoir. For example, if a user is owed $0.30 then the program may return 1 quarter and 1 nickel. However, if there are no quarters, the program should be smart enough to return a different combination of that doesn’t include quarters. (If no combination of change exists, the user’s order should be cancelled and the user should be allowed to make an alternate selection)
7. Once a transaction is complete, the user should be prompted to make a new selection. The program will end when a user enters a negative money amount and “000” for the item number.
Product Inventory:
Below is a breakdown of the products offered by the vending machine. In addition to the product names, the prices, item number and quantities are also listed below. The user will use the item number to select the product they wish to purchase.
Product Name Item Number Price Quantity in Stock
Candy Bar 123 $0.60 60
Gum 124 $0.35 75
Potato Chips 125 $0.75 40
Trail Mix 126 $.050 50
Breakfast Bar 127 $0.80 45

Sure! Here is the pseudocode to control the operation of the vending machine:

MoneyReservoir = 0
ProductInventory = {
"123": {"name": "Candy Bar", "price": 0.60, "quantity": 60},
"124": {"name": "Gum", "price": 0.35, "quantity": 75},
"125": {"name": "Potato Chips", "price": 0.75, "quantity": 40},
"126": {"name": "Trail Mix", "price": 0.50, "quantity": 50},
"127": {"name": "Breakfast Bar", "price": 0.80, "quantity": 45}
}

While True:
Print("Enter item number and money (negative money amount and '000' to terminate): ")
ItemNumber = ReadInput()
Money = ReadInput()

If ItemNumber < 0 and Money == '000':
Break

If ItemNumber not in ProductInventory:
Print("Invalid item number. Please re-enter.")
Continue

Item = ProductInventory[ItemNumber]

If Money < Item['price']:
Print("Insufficient money. Please add more money.")
Continue

If Item['quantity'] <= 0:
Print("Item out of stock. Press 1 to select a new item or 2 to cancel the order.")
Choice = ReadInput()

If Choice == 1:
Continue
Else:
Continue

Change = Money - Item['price']

If Change > MoneyReservoir:
Print("Sorry, no change available. Press 1 to select a new item or 2 to cancel the order.")
Choice = ReadInput()

If Choice == 1:
Continue
Else:
Continue

# Calculate and dispense change
Quarters = 0
Dimes = 0
Nickels = 0
Pennies = 0

While Change > 0:
If Change >= 0.25 and Quarters < MoneyReservoir['quarters']:
Quarters += 1
Change -= 0.25
ElseIf Change >= 0.10 and Dimes < MoneyReservoir['dimes']:
Dimes += 1
Change -= 0.10
ElseIf Change >= 0.05 and Nickels < MoneyReservoir['nickels']:
Nickels += 1
Change -= 0.05
ElseIf Change >= 0.01 and Pennies < MoneyReservoir['pennies']:
Pennies += 1
Change -= 0.01
Else:
Print("Sorry, no change available. Press 1 to select a new item or 2 to cancel the order.")
Choice = ReadInput()

If Choice == 1:
Continue
Else:
Continue

# Update money reservoir and product inventory
MoneyReservoir -= Change
Item['quantity'] -= 1

Print("Dispensing", Item['name'])
If Quarters > 0:
Print(Quarters, "quarters")
Decrease MoneyReservoir['quarters'] by Quarters
If Dimes > 0:
Print(Dimes, "dimes")
Decrease MoneyReservoir['dimes'] by Dimes
If Nickels > 0:
Print(Nickels, "nickels")
Decrease MoneyReservoir['nickels'] by Nickels
If Pennies > 0:
Print(Pennies, "pennies")
Decrease MoneyReservoir['pennies'] by Pennies

Print("Please make a new selection.")