Advertisement
kaly1

Shopping_list_for_test

Nov 4th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. shopping = ["Bread","Milk","Chesse","Tomatoes","Water"]
  2. y = len(shopping)
  3. y_str = str(y)
  4. print("The number of items in your shopping ist is " + y_str)
  5. count = 0
  6. item_no = 1
  7. for items in shopping:
  8. item_no_str = str(item_no)
  9. print(item_no_str + ")" + items + " -->Bought")
  10. count = count + 1
  11. item_no = item_no + 1
  12. count_str = str(count)
  13. print("The number of items bought are " + count_str)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement