Advertisement
rjsingletary

Lesson 3 Challenge

Nov 13th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. shopping=[]
  2.  
  3. how_many=input("How many items of shopping are needed?")
  4. how_many=int(how_many)
  5. for item_number in range(how_many):
  6. item=input("What is item number" + str(item_number) + "?")
  7. shopping.append(item)
  8.  
  9. print(shopping)
  10.  
  11. print("This is my updated list:")
  12.  
  13.  
  14. for item in shopping:
  15. print(item)
  16.  
  17. count=0
  18. for item in shopping:
  19. print(item)
  20. count=count +1
  21. print (count)
  22. print("items in my shopping list")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement