Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. ani_budget = int(input())
  2. towel_price = float(input())
  3. discount = int(input())
  4.  
  5. umbrella_price = towel_price / 3 * 2
  6. flip_flops_price = umbrella_price * 0.75
  7. bag_price = (flip_flops_price + towel_price) / 3
  8. total_amount_products = towel_price + umbrella_price + flip_flops_price + bag_price
  9. discout_percentage = discount / 100
  10. total_amount_products_discount = total_amount_products - (total_amount_products * discout_percentage)
  11.  
  12.  
  13. if ani_budget >= total_amount_products:
  14. amount_left = ani_budget - total_amount_products_discount
  15. print(f"Annie's sum is {total_amount_products_discount:.2f} lv. She has {amount_left:.2f} lv. left.")
  16. else:
  17. budget_left = total_amount_products_discount - ani_budget
  18. print(f"Annie's sum is {total_amount_products_discount:.2f} lv. She needs {budget_left:.2f} lv. more.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement