Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- count = 0 # shopping list count
- how_many = input("how many items of shopping are there today? ")
- how_many = int(how_many)
- shopping = []
- for item_number in range(how_many): # loop to input shopping items
- item = input("What is the item number " + str(item_number) +" ? > ")
- shopping.append(item)
- for item in shopping: # for loop to print out shopping
- print(item)
- count = count + 1
- print("there are " + str(count) + " items in your trolly") # count tally
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement