Advertisement
Spocoman

Add Bags

Feb 16th, 2022 (edited)
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. price_over_20_kg = float(input())
  2. bag_weight = float(input())
  3. day_before = int(input())
  4. bag_count = int(input())
  5.  
  6. if bag_weight < 10:
  7.     price_over_20_kg /= 5
  8. elif bag_weight <= 20:
  9.     price_over_20_kg /= 2
  10.  
  11. if day_before < 7:
  12.     price_over_20_kg *= 1.4
  13. elif day_before <= 30:
  14.     price_over_20_kg *= 1.15
  15. elif day_before > 30:
  16.     price_over_20_kg *= 1.1
  17.  
  18. total = price_over_20_kg * bag_count
  19.  
  20. print(f' The total price of bags is: {total:.2f} lv. ')
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement