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 == "divide the cost of a meal in a restaurant":
- food = []
- R1 = input ( "How many items are in a meal in a restaurant ? ")
- i =0
- j = 0
- k =0
- for item_number in range(int(R1)):
- item = input ( "What is the item " + str(item_number+1) + " in a meal in a restaurant ? " )
- food.append(item)
- cost1= input ( "What is the list price of the " + item + " in restaurant ? " )
- cost_R = input( " What is the price of the " + item + " in market? " )
- i = i + int(cost1)
- j = j + int(cost_R)
- k = (j / i) *100
- print ( "the food if I go to buy myself in the market is " + str(k) + "% I spent in a restaurant that night." )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement