Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- item = []
- price = []
- numItem = input("How many items are in the inventory? ")
- for i in range(numItem):
- itemName=raw_input("Please enter the item name: ")
- item.append(itemName)
- itemPrice=input("Please enter the price of the item: ")
- price.append(itemPrice)
- spendAMT = input("How much would you like to spend? ")
- for i in range(len(price)):
- if price[i] <= spendAMT:
- print "Item: ",item[i] ,", Price: ",price[i]
- else:
- print "There are no items in that range"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement