Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shopping = []
- count = 0
- total_price = 0
- koliko = int(input("How many items of shopping do You have? "))
- for i in range (koliko):
- item= input("What is item number " + str(i+1) +"? ")
- shopping.append(item)
- cost = float(input("What is the price of " + item + " ? "))
- pieces = int(input("How many pieces of " + item + " do you need? "))
- total_price = total_price + pieces * cost
- print ("You have ", koliko, "items in Your shopping list. These are:")
- for i in shopping:
- print(i)
- print ("The total price is ", total_price, "$")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement