Advertisement
Spocoman

06. Orders

Jan 13th, 2022 (edited)
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. orders = int(input())
  2. total_price = 0
  3.  
  4. for i in range(orders):
  5.     capsule_price = float(input())
  6.     days = int(input())
  7.     capsule_count = int(input())
  8.     if 0.01 <= capsule_price <= 100 and 0 < days <= 31 and 0 < capsule_count <= 2000:
  9.         price = capsule_price * days * capsule_count
  10.         print(f'The price for the coffee is: ${price:.2f}')
  11.         total_price += price
  12.  
  13. print(f'Total: ${total_price:.2f}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement