"""Function Exercises"""


def get_hypotenuse():
    """Return the hypotenuse given other two right triangle sides."""


def parse_time():
    """Return total seconds from string of minutes:seconds."""


def format_time():
    """Return a minutes:seconds string based on input seconds."""


def coalesce():
    """Return value if given value is None, else return given default."""


def to_percent():
    """Return a percentage string representing the given numeric ratio."""


def to_celsius():
    """Convert Fahrenheit temperature to Celsius."""


def is_leap_year():
    """Return True if given year is a leap year."""


def is_perfect_square():
    """Return True if given number is the square of an integer."""


if __name__ == "__main__":
    print('To test a specific function, run "python3 test.py <function_name>"')
    print("Alternatively, you can edit this file to write your own assertions")
    # If you'd like, you can put your own assertions here
    # To check these assertions run: python3 functions.py
    # Removing "# " from the lines below will "uncomment" that code

    # assert get_hypotenuse(3, 4) == 5
    # assert get_hypotenuse(5, 12) == 13
    # assert get_hypotenuse(5, 12) == 13

    # assert coalesce(3, 0) == 3
    # assert coalesce(None, 0) == 0
    # name = "Trey"
    # assert coalesce(name, "") == "Trey"
    # color = None
    # assert coalesce(color, "") == ""

    # assert to_percent(1.0) == "100.0%"
    # assert to_percent(0.5) == "50.0%"
    # assert to_percent(0.0054) == "0.5%"
    # assert to_percent(0.02534) == "2.5%"
    # assert to_percent(0.1347) == "13.5%"
    # assert to_percent(1.0 / 3) == "33.3%"
    # assert to_percent(1.5678) == "156.8%"

    # assert to_celsius(212) == 100
    # assert to_celsius(122) == 50
    # assert to_celsius(68) == 20
    # assert to_celsius(32) == 0

    # assert not is_leap_year(1900)
    # assert not is_leap_year(1996)
    # assert is_leap_year(1998)
    # assert is_leap_year(2000)
    # assert not is_leap_year(2001)
    # assert is_leap_year(2012)
    # assort not is_leap_year(2018)

    # assert not is_perfect_square(24)
    # assert is_perfect_square(25)
    # assert is_perfect_square(119025)
    # assert is_perfect_square(81)
    # assert not is_perfect_square(33)
    # assert is_perfect_square(1024)
    # assert not is_perfect_square(24)
