Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- championship = input()
- type_of_ticket = input()
- tickets_count = int(input())
- trophy_selfie = input()
- ticket_price = 0
- if championship == "Quarter final":
- if type_of_ticket == "Standard":
- ticket_price = 55.50
- elif type_of_ticket == "Premium":
- ticket_price = 105.20
- elif type_of_ticket == "VIP":
- ticket_price = 118.90
- elif championship == "Semi final":
- if type_of_ticket == "Standard":
- ticket_price = 75.88
- elif type_of_ticket == "Premium":
- ticket_price = 125.22
- elif type_of_ticket == "VIP":
- ticket_price = 300.40
- elif championship == "Final":
- if type_of_ticket == "Standard":
- ticket_price = 110.10
- elif type_of_ticket == "Premium":
- ticket_price = 160.66
- elif type_of_ticket == "VIP":
- ticket_price = 400
- total_price = ticket_price * tickets_count
- if total_price > 4000:
- total_price *= 0.75
- trophy_selfie = "N"
- elif total_price > 2500:
- total_price *= 0.9
- if trophy_selfie == "Y":
- total_price += tickets_count * 40
- print(f"{total_price:.2f}")
- РЕШЕНИЕ С ТЕРНАРЕН ОПЕРАТОР:
- championship = input()
- type_of_ticket = input()
- tickets_count = int(input())
- total_price = ((55.50 if type_of_ticket == "Standard" else 105.20 if type_of_ticket == "Premium" else 118.90)
- if championship == "Quarter final" else
- (75.88 if type_of_ticket == "Standard" else 125.22 if type_of_ticket == "Premium" else 300.40)
- if championship == "Semi final" else
- (110.10 if type_of_ticket == "Standard" else 160.66 if type_of_ticket == "Premium" else 400)) * tickets_count
- trophy_selfie = "N" if total_price > 4000 else input()
- total_price *= 0.75 if total_price > 4000 else 0.9 if total_price > 2500 else 1
- total_price += tickets_count * 40 if trophy_selfie == "Y" else 0
- print(f"{total_price:.2f}")
Add Comment
Please, Sign In to add comment