Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- budget = float(input())
- video_cards = int(input())
- processors = int(input())
- ram = int(input())
- price_video = 250 * video_cards
- price_processor = ((price_video * 35) / 100) * processors
- price_ram = ((price_video * 10) / 100) * ram
- sum = price_video + price_processor + price_ram
- if video_cards >= processors:
- sum = sum - ((sum * 15)/100)
- if sum <= budget:
- sum_left = budget - sum
- print(f'You have {sum_left:.2f} leva left!')
- else:
- sum_left2 = sum - budget
- print(f'Not enough money! You need {sum_left2:.2f} leva more!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement