"""
Programming Techniques — Lecture 5
Guided exercise: conditional statements and input validation

Scenario:
A museum offers a reduced ticket price to young visitors.
The program asks for the visitor age, validates the input, and prints
which ticket price applies.

Complete the TODO parts during the guided activity.
"""

FULL_PRICE = 12.00
REDUCED_PRICE = 7.00
MIN_AGE = 0
MAX_AGE = 120
REDUCED_LIMIT = 18

# 1. Read user input as text
age_text = input("Enter your age: ")

# 2. Validate the input format BEFORE converting it to int
# Hint: age_text.isdigit() is True only if all characters are digits.
if __________________________:

    # Only now it is safe to convert the input
    age = int(age_text)

    # 3. Validate the numeric value
    if __________________________:
        print("Invalid age: value outside the accepted range.")

    # 4. Apply the ticket rule
    elif __________________________:
        price = REDUCED_PRICE
        print(f"Reduced ticket: €{price:.2f}")

    else:
        price = FULL_PRICE
        print(f"Full-price ticket: €{price:.2f}")

else:
    print("Invalid input: please enter age using digits only.")


# Suggested tests
# 16      -> reduced ticket
# 25      -> full-price ticket
# -3      -> invalid input
# abc     -> invalid input
# 150     -> invalid age
# empty   -> invalid input
