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