Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- budget = float(input())
- number_videocards = int(input())
- number_processors = int(input())
- number_ram = int(input())
- price_videocards = number_videocards * 250
- price_processors = number_processors * (price_videocards * 0.35)
- price_ram = number_ram * (price_videocards * 0.10)
- total_price = price_ram + price_processors + price_videocards
- if number_videocards > number_processors:
- total_price -= total_price * 0.15
- else:
- pass
- if total_price < budget:
- money_left = budget - total_price
- print(f'You have {money_left:.2f} leva left!')
- else:
- money_needed = total_price - budget
- print(f'Not enough money! You need {money_needed:.2f} leva more!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement