Advertisement
zhongnaomi

make a shopping list with python 4

Jan 7th, 2019
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. shopping = []
  2. R1 = input ( "How many items of shopping do you have? ")
  3.  
  4. for item_number in range(int(R1)):
  5.     item = input ( "What is the No." + str(item_number+1) + " item to buy today? " )
  6.     shopping.append(item)
  7.  
  8. count = 0    
  9. for item in shopping:
  10.     print(item)
  11.     count = count + 1
  12.  
  13. print ("you have " + R1 + " items in your shopping list. " )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement