crzcas

shopping-combined

Nov 30th, 2020
59
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.  
  3. how_many = input("how many items of shopping do you have? ")
  4. how_many = int(how_many)
  5.  
  6. for item_number in range (how_many):
  7. item = input("What is the number " + str(item_number) + "? ")
  8. shopping.append(item)
  9. print(shopping)
  10.  
  11. for item in shopping:
  12. print(item)
  13. print("You have " + str(len(shopping)) + " items in your shopping list")
Advertisement
Add Comment
Please, Sign In to add comment