"""Flight times"""
# A flight was scheduled to arrive at a particular time, 
# but it is now estimated to arrive at another time.
# Write a function that returns the flight's status:
# on time, early, or delayed.

# Times are represented as floats, for example:
# 8:00am is represented by 8.0
# 2:30pm is represented by 14.5

# Write a function that gives the flight status 
# given the scheduled and estimated times of arrival.


def report_status(scheduled_time: float, estimated_time: float) -> str:
    """Return the flight status (on time, early, delayed) for
    a flight that was scheduled to arrive at scheduled_time,
    but is now estimated to arrive at estimated_time.
    Assume all times are on the same day.
    
    Precondition: 0.0 <= scheduled_time < 24,
    0.0 <= estimated_time < 24
    
    >>> report_status(14.3, 14.3)
    'on time'
    >>> report_status(12.5, 11.5)
    'early'
    >>> report_status(9.0, 9.5)
    'delayed'
    """
    
    if scheduled_time == estimated_time:
        return 'on time'
    elif scheduled_time > estimated_time:
        return 'early'
    else: 
        return 'delayed'

