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 == "calculate a discount for my basket":
- shopping = []
- R1 = input ( "How many items are in your basket ? ")
- save = 0
- for item_number in range(int(R1)):
- item = input ( "What is the item " + str(item_number+1) + " you wish to buy ? " )
- shopping.append(item)
- cost1= input ( "What is the list price of the " + item + " you wish to buy today ? " )
- cost_off = input( " What is the percentage discount for the " + item + "? " )
- save = save + int(cost1)*(int(cost_off)/100)
- print ( "You will save " + str(save) + " RMB. " )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement