Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def calculate_gladiator_expenses(lost_fights, helmet_price, sword_price, shield_price, armor_price):
- helmet_breaks = lost_fights // 2
- sword_breaks = lost_fights // 3
- shield_breaks = lost_fights // 6
- armor_breaks = shield_breaks // 2
- total_expenses = (helmet_breaks * helmet_price) + (sword_breaks * sword_price) + \
- (shield_breaks * shield_price) + (armor_breaks * armor_price)
- return total_expenses
- lost_fights = int(input())
- helmet_price = float(input())
- sword_price = float(input())
- shield_price = float(input())
- armor_price = float(input())
- expenses = calculate_gladiator_expenses(lost_fights, helmet_price, sword_price, shield_price, armor_price)
- print(f"Gladiator expenses: {expenses:.2f} aureus")
Add Comment
Please, Sign In to add comment