Advertisement
Roddyn

shopping challenge

Dec 18th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. shopping = []
  2. count= 0
  3. shopping_items=int(input("How many items in your shopping list?" ))
  4.  
  5.  
  6. for item_number in range(shopping_items):
  7. item = input("what is item number " + str(shopping_items) + "? ")
  8. shopping.append(item)
  9. count= count +1
  10.  
  11. output = str(count)
  12.  
  13. print(shopping)
  14.  
  15. print("You have " + output + " items in your shopping list.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement