#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)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter