#Write a program that calculates the total cost of amusement park #ticket. #Input: full price of the ticket (float), age of the person #(integer), tax (integer). #Output: Total price after discount and taxes are taken in account. #TAX APPLIED AFTER DISCOUNT. #Ticket Price Rules: # age 0-5: free # age 6 - 18: 25% discount # 19 and older: full price #Assume that input is valid. #Input age=int(input("enter age ")) price=float(input("enter price ")) tax=int(input("enter tax ")) #Assuming the Input is VALID in this solution if(age<=5): final=0 elif(age<=18): final_pre_tax=price-price*25/100 final=final_pre_tax*(1+tax/100) else: final=price*(1+tax/100) print("final price is", format(final,".2f"))