Advertisement
Pedroleon

Shopping List Generator

Jan 12th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. print("SHOPPING LIST GENERATOR")
  2. shopping = []
  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 the item number " + str(item_number) + " ? ")
  9. shopping.append(item)
  10. print()
  11. print("This is the list :")
  12. for item in shopping:
  13. print (item)
  14.  
  15.  
  16. print("You have " + str(how_many) + " items in your shopping list.")
  17. print("")
  18. print(len(shopping))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement