Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ani_budget = int(input())
- towel_price = float(input())
- discount = int(input())
- umbrella_price = towel_price / 3 * 2
- flip_flops_price = umbrella_price * 0.75
- bag_price = (flip_flops_price + towel_price) / 3
- total_amount_products = towel_price + umbrella_price + flip_flops_price + bag_price
- discout_percentage = discount / 100
- total_amount_products_discount = total_amount_products - (total_amount_products * discout_percentage)
- if ani_budget >= total_amount_products:
- amount_left = ani_budget - total_amount_products_discount
- print(f"Annie's sum is {total_amount_products_discount:.2f} lv. She has {amount_left:.2f} lv. left.")
- else:
- budget_left = total_amount_products_discount - ani_budget
- 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