Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. item = []
  2. price = []
  3. numItem = input("How many items are in the inventory? ")
  4.  
  5. for i in range(numItem):
  6. itemName=raw_input("Please enter the item name: ")
  7. item.append(itemName)
  8. itemPrice=input("Please enter the price of the item: ")
  9. price.append(itemPrice)
  10. spendAMT = input("How much would you like to spend? ")
  11. for i in range(len(price)):
  12. if price[i] <= spendAMT:
  13. print "Item: ",item[i] ,", Price: ",price[i]
  14. else:
  15. print "There are no items in that range"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement