Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- how_many = int(input("how many items do you need? "))
- shopping = [[], []]
- for item_number in range(how_many):
- item = input("what is item " + str(item_number) + " ? ")
- shopping[0].append(item)
- price = float(input("how much does that cost? "))
- shopping[1].append(price)
- count = 0
- item2 = -1
- price = 0
- print
- print("you have " + str(how_many) + " items in your shopping list:")
- print()
- print()
- print(" CUSTOMER SHOPPING LIST")
- for item in shopping[0]:
- item2 = int(item2 + 1)
- price = shopping[1][item2]
- print(" " + (item) + " costing " + str(price))
- total = 0
- for item_number in range(how_many):
- total = total + shopping[1][count]
- count = count + 1
- print("the total for your groceries will be " + str(total))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement