Question 3
Sun Dec 18 2022 10:35:45 GMT+0000 (Coordinated Universal Time)
Saved by
@qeebza
#Question 3
price1 = float(input("Price of drink #1"))
price2 = float(input("Price of drink #2"))
if price1 < price2:
total_price = price1 * 0.5 + price2
else:
total_price = price1 + price2 * 0.5
print("Total price = RM", total_price)
content_copyCOPY
Comments