Advertisement
Guest User

Untitled

a guest
Dec 9th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. shopping=[]
  2. count=0
  3. how_many=input("how many items of shopping do you require? ")
  4. how_many=int(how_many)
  5. for item_number in range(how_many):
  6. item_number=item_number+1
  7. item = input("what is item number " + str(item_number) + "? ")
  8. shopping.append(item)
  9. for item in shopping:
  10. print(item)
  11. count=count+1
  12. print("There are "+str(count)+" items in your shopping list")
  13. print(len(shopping))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement