Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. shopping =[]
  2. count = 0
  3. how_many =input("how many items of shopping do you have? ")
  4. how_many =int(how_many)
  5. for item_number in range(how_many):
  6. item = input("what is the item? "+ str(item_number)+"? ")
  7. shopping.append(item)
  8. count = count +1
  9. print(shopping)
  10. print ("You have " + str(count)+" items in your shopping list")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement