Advertisement
MartC

create_shopping_comb

Apr 7th, 2020
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. shopping = []
  2. count = 0
  3.  
  4. how_many = input("How many items of shopping do you have? ")
  5. how_many = int(how_many)
  6.  
  7. for item_number in range(how_many):
  8.     item = input("What is item number "+ str(item_number +1) + "? ")
  9.     shopping.append(item)
  10.  
  11. for item in shopping:
  12.     print(item)
  13.     count = count + 1
  14.     len(shopping)
  15.    
  16. print("You have " + str(len(shopping)) + " items in your shopping list")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement