Advertisement
zhongnaomi

make a shopping list with bot

Jan 10th, 2019
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. print("Hi, I am Marvin, your personal bot.")
  2. command = input("How can I help? ")
  3. if command == "make a shopping list":
  4.     shopping = []
  5.     R1 = input ( "How many items of shopping do you have? ")
  6.  
  7.     for item_number in range(int(R1)):
  8.         item = input ( "What is the No." + str(item_number+1) + " item to buy today? " )
  9.         shopping.append(item)
  10.    
  11.     count = 0    
  12.     print ("your shopping list item are those items " )
  13.     for item in shopping:
  14.         print(item)
  15.         count = count + 1
  16.  
  17. print ("you have " + R1 + " items in your shopping list. " )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement