Cinema Ticket

Lab Python Intermediate 20 points

Read an age and a day of the week. Base price is 200. Children under 12 pay half, seniors 60+ pay 120, and on Tuesday everyone gets 50 off the result. Print the final price.

Input

Line 1: age. Line 2: day name.

Output

The price as an integer.

Example

Input

30
Monday

Output

200
Sample input available Sample output available
Editor
Python

Hints

Work out the age price first, then apply the Tuesday discount separately.

Solution explanation

Two independent decisions are clearer as two separate if statements.

Show solution
age = int(input())
day = input()
if age < 12:
    price = 100
elif age >= 60:
    price = 120
else:
    price = 200
if day == "Tuesday":
    price -= 50
print(price)
Output
Answer
HOME LEARN COMMUNITY DASHBOARD