Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Hi, I am Marvin, your personal bot.")
- command = input("How can I help? ")
- if command == "make a shopping list":
- shopping = []
- R1 = input ( "How many items of shopping do you have? ")
- i = 0
- j = 0
- for item_number in range(int(R1)):
- item = input ( "What is the No." + str(item_number+1) + " item to buy today? " )
- shopping.append(item)
- i = i+1
- cost_str= input( " How much is this ?" )
- j = j + int(cost_str)
- count = 0
- print ("your shopping list items are : " )
- for item in shopping:
- print(item)
- count = count + 1
- print ("you have " + R1 + " items in your shopping list. Shopping will cost " + str(j) + " RMB . " )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement