Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- vacation_price = float(input())
- puzzles = int(input())
- dolls = int(input())
- bears = int(input())
- minions = int(input())
- trucks = int(input())
- count_toys = puzzles + dolls + bears + minions + trucks
- price_puzzles = puzzles * 2.60
- price_dolls = dolls * 3
- price_bears = bears * 4.10
- price_minions = minions * 8.20
- price_trucks = trucks * 2
- price_all = price_puzzles + price_dolls + price_bears + price_minions + price_trucks
- if count_toys >= 50:
- discount = price_all * 0.25
- price_all = price_all - discount
- magazine_rent = price_all * 0.1
- final = price_all - magazine_rent
- rest_money = final - vacation_price
- if rest_money >= 0:
- print(f'Yes! {rest_money:.2f} lv left.')
- else:
- print(f'Not enough money! {abs(rest_money):.2f} lv needed.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement