inventory = 20
while inventory > 0:
print("We have", inventory, "items in inventory.")
purchase = int(input("How many would you like to buy? "))
if purchase > inventory:
print("There is not enough in inventory for that purchase.")
else:
inventory -= purchase
if inventory == 0:
print("All out!")
else:
print("Now we have", inventory, "left.")