Facebook
From Rossen Stefanov, 3 Years ago, written in Python.
Embed
Download Paste or View Raw
Hits: 48
  1. orders = int(input())
  2. sumi = 0
  3. for i in range(orders):
  4.     price_per_capsule = float(input())
  5.     days = int(input())
  6.     capsules_count = int(input())
  7.     price = days*price_per_capsule*capsules_count
  8.     sumi += price
  9.     print(f"The price for the coffee is: ${price:.2f}")
  10. print(f"Total: ${sumi:.2f}")