"""
CSCI 145 Homework 1 - Functions

Author: YOUR NAME

Resources:
    What resources helped you with this assignment? (office hours,
    drop-in sessions, peers, internet search, AI tools, etc.)
"""

# ----------------------
# Section 1: Functions that return a value
# ----------------------

def euros_to_dollars(price):
    """
    Convert a price in euros to the equivalent price in dollars.

    Parameters:
        price (float): a price in euros

    Returns:
        float: the equivalent price in dollars

    Example:
        >>> euros_to_dollars(30)
        34.8
    """
    # YOUR CODE HERE


def kilometers_to_miles(km):
    """
    Convert a distance in kilometers to the equivalent distance in miles.

    Parameters:
        km (float): a distance in kilometers

    Returns:
        float: the equivalent distance in miles

    Example:
        >>> kilometers_to_miles(500)
        310.6855
    """
    # YOUR CODE HERE


def celsius_to_fahrenheit(celsius):
    """
    Convert a temperature in Celsius to the equivalent temperature in
    Fahrenheit.

    Parameters:
        celsius (float): a temperature in degrees Celsius

    Returns:
        float: the equivalent temperature in degrees Fahrenheit

    Example:
        >>> celsius_to_fahrenheit(22)
        71.6
    """
    # YOUR CODE HERE


def mpg_from_metric(km, liters):
    """
    Compute miles per gallon from a distance in kilometers and an amount
    of fuel in liters.

    Parameters:
        km (float): a distance in kilometers
        liters (float): an amount of fuel in liters

    Returns:
        float: the equivalent fuel efficiency in miles per gallon

    Example:
        >>> mpg_from_metric(400, 30)
        31.3619409576589
    """
    # YOUR CODE HERE


# ----------------------
# Section 2: Functions that print
# ----------------------

def four_fours():
    """
    Print the values 0 through 9, each expressed using exactly four 4s,
    along with the expression that produced it.

    Allowed operators are +, -, *, //, %, **, and parentheses.

    Parameters: None

    Returns:
        None

    Example:
        >>> four_fours()
        0 is 4+4-4-4
        1 is ...
        ...
    """
    print(4 + 4 - 4 - 4, "is 4+4-4-4")  # 0
    # YOUR CODE HERE -- add similar print statements for 1 through 9


def convert_from_seconds(seconds):
    """
    Print the number of days, hours, minutes, and remaining seconds in a
    given number of seconds.

    0 <= hours < 24, 0 <= minutes < 60, and 0 <= seconds < 60.

    Parameters:
        seconds (int): a non-negative number of seconds

    Returns:
        None

    Example:
        >>> convert_from_seconds(3787)
        0 days
        1 hours
        3 minutes
        7 seconds
    """
    days = seconds // (24 * 60 * 60)  # Number of days
    seconds = seconds % (24 * 60 * 60)  # The leftover seconds
    # YOUR CODE HERE -- compute hours, minutes, and remaining seconds
    print(days, "days")
    # YOUR CODE HERE -- print hours, minutes, and seconds
