def calculatePriceOfSingleRide(distance, duration):
    """Calculate the price of one single ride

    Adjust this function to the needs of your pricing structure.

    If the duration of the ride is larger than \"highDuration\",
    the price of the ride is at least \"minPriceHighDuration\".

    Prices per kilometer decrease in two steps from rate1, over rate2
    to rate3.
    rate1 applies to kilometers from zero up to \"maxDistanceForRate1\".
    rate2 applies to kilometers from \"maxDistanceForRate1\"
    up to \"maxDistanceForRate2\".
    rate3 applies to all kilometers up from \"maxDistanceForRate2\".

    Parameters
    ----------
    distance : float
        Distance of the ride in kilometer
    duration : float
        Duration of the ride in hours

    Returns
    -------
    Float
        The price in Euro

    Raises
    ------
    None
    """

    highDuration = 24  # [h]
    minPriceHighDuration = 25  # [Euro]

    rate1 = 0.5  # [Euro / km]
    rate2 = 0.28  # [Euro / km]
    rate3 = 0.23  # [Euro / km]
    maxDistanceForRate1 = 50  # [km]
    maxDistanceForRate2 = 100  # [km]

    # Calc temporary price based on distance
    if distance <= maxDistanceForRate1:
        tmpPrice = distance * rate1
    elif distance <= maxDistanceForRate2:
        tmpPrice = (
            maxDistanceForRate1 * rate1 + (distance - maxDistanceForRate1) * rate2
        )
    else:
        tmpPrice = (
            maxDistanceForRate1 * rate1
            + (maxDistanceForRate2 - maxDistanceForRate1) * rate2
            + (distance - maxDistanceForRate2) * rate3
        )

    # Ensure minimum price if duration is high
    if highDuration <= duration:
        price = max([tmpPrice, minPriceHighDuration])
    else:
        price = tmpPrice

    return price