The program below was written to determine ticket prices based on the day of the week and the age of the customer. The following rules apply in this order:

If a customer is under 12 or over 60 years old, and it is Monday or Tuesday, the ticket should cost $3.
If a customer is under 12 or over 60 years old, and it is Wednesday or Thursday, the ticket should cost $5.
If it is Monday or Tuesday, the ticket should cost $7.
Otherwise, the ticket should cost $10.
The following examples demonstrate the expected program output.

Enter day: Monday
Enter age: 15
Ticket price: $7
Enter day: Thursday
Enter age: 65
Ticket price: $5
Enter day: Tuesday
Enter age: 50
Ticket price: $7
Enter day: Saturday
Enter age: 15
Ticket price: $10
The program is complete, but it contains some errors! Not all conditions produce the expected output. Examine the logical expressions closely and add parentheses where needed to make the program work as expected.

day = input("Enter day: ")
age = int(input("Enter age: "))

if day == "Monday" or day == "Tuesday" and age < 12 or age > 60:
print("Ticket price: $3")
elif day == "Wednesday" or day == "Thursday" and age < 12 or age > 60:
print("Ticket price: $5")
elif day == "Monday" or day == "Tuesday":
print("Ticket price: $7")
else:
print("Ticket price: $10")

day = input("Enter day: ")

age = int(input("Enter age: "))

if (day == "Monday" or day == "Tuesday") and (age < 12 or age > 60):
print("Ticket price: $3")
elif (day == "Wednesday" or day == "Thursday") and (age < 12 or age > 60):
print("Ticket price: $5")
elif day == "Monday" or day == "Tuesday":
print("Ticket price: $7")
else:
print("Ticket price: $10")