Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- loss_fights = int(input())
- helmet_price = float(input())
- sword_price = float(input())
- shield_price = float(input())
- armor_price = float(input())
- aureus = 0
- shield_broken_counter = 0
- for loss in range (1,loss_fights + 1):
- helmet_broken = False
- sword_broken = False
- if loss % 2 == 0:
- aureus+= helmet_price
- helmet_broken = True
- if loss % 3 == 0:
- aureus+= sword_price
- sword_broken = True
- if helmet_broken and sword_broken:
- aureus += shield_price
- shield_broken_counter += 1
- if shield_broken_counter % 2 == 0:
- aureus += armor_price
- print(f'Gladiator expenses: {aureus:.2f} aureus')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement