Advertisement
pacho_the_python

Untitled

Sep 22nd, 2021
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.61 KB | None | 0 0
  1. bag_20_kg_price = float(input())
  2. bag_kg = float(input())
  3. days_left = int(input())
  4. bag_count = int(input())
  5.  
  6. bag_fee = 0
  7. bag_10kg = bag_20_kg_price * 0.2
  8. bag_10_20 = bag_20_kg_price * 0.5
  9.  
  10. if bag_kg <= 10:
  11.     bag_fee = bag_10kg
  12. elif 10 < bag_kg <= 20:
  13.     bag_fee = bag_10_20
  14. else:
  15.     bag_fee = bag_20_kg_price
  16.  
  17. add_fee = 0
  18.  
  19. if days_left > 30:
  20.     add_fee = bag_fee + (bag_fee * 0.1)
  21. elif 7 <= days_left <= 30:
  22.     add_fee = bag_fee + (bag_fee * 0.15)
  23. else:
  24.     add_fee = bag_fee + (bag_fee * 0.4)
  25.  
  26. total_bag_price = add_fee * bag_count
  27.  
  28. print(f"The total price of bags is {total_bag_price:.2f} lv.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement