Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- budget = float(input())
- video_cards_count = int(input())
- proc_count = int(input())
- ram_count = int(input())
- video_card_sum = video_cards_count * 250
- proc_sum = (video_card_sum * 0.35) * proc_count
- ram_sum = (video_card_sum * 0.10) * ram_count
- total_sum = video_card_sum + proc_sum + ram_sum
- if video_cards_count > proc_count:
- total_sum = total_sum * 0.85
- diff = abs(total_sum - budget)
- if budget >= total_sum:
- print(f"You have {diff:.2f} leva left!")
- else:
- print(f"Not enough money! You need {diff:.2f} leva more!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement