Advertisement
HristoBaychev

Untitled

Feb 13th, 2023
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. fruit = input()
  2. pack = input()
  3. pack_num = int(input())
  4.  
  5. price = 0
  6. discount = 0
  7. final_price = 0
  8.  
  9. if fruit == "Watermelon":
  10. if pack == "small":
  11. price = 56.00 * 2
  12. elif pack == "big":
  13. price = 28.70 * 5
  14. elif fruit == "Mango":
  15. if pack == "small":
  16. price = 36.66 * 2
  17. elif pack == "big":
  18. price = 19.60 * 5
  19. elif fruit == "Pineapple":
  20. if pack == "small":
  21. price = 42.10 * 2
  22. elif pack == "big":
  23. price = 24.80 * 5
  24. else:
  25. if pack == "small":
  26. price = 20.00 * 2
  27. elif pack == "big":
  28. price = 15.20 * 5
  29.  
  30. price_to_pay = price * pack_num
  31.  
  32. if 400 <= price_to_pay <= 1000:
  33. discount = price_to_pay * 0.15
  34. final_price = price_to_pay - discount
  35. elif price_to_pay > 1000:
  36. discount = price_to_pay * 0.50
  37. final_price = price_to_pay - discount
  38. else:
  39. final_price = price_to_pay
  40.  
  41. print(f"{final_price:.2f} lv.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement