Advertisement
ALEXANDAR_GEORGIEV

orders

Sep 22nd, 2022
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. orders_num = int(input())
  2. total_price = 0
  3. for i in range(orders_num):
  4.     price_capsule = float(input())
  5.     if 0.01 <= price_capsule <= 100.0:
  6.         continue
  7.     days = int(input())
  8.     if 1 <= days <= 31:
  9.         continue
  10.     needed_capsules = int(input())
  11.     if 1 <= needed_capsules <= 2000:
  12.         continue
  13.     sum_of_price = price_capsule * days * needed_capsules
  14.     print(f"The price for the coffee is: ${sum_of_price}")
  15.     total_price += sum_of_price
  16.  
  17. print(f"Total: ${total_price}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement