/**
 * A photographer charges a set price per photo.
 * If the number of photos is greater than 10, the customer receives a 10% discount.
 * If the number of photos is greater than 20, the customer receives a 20% discount.
 * The function calculates the total price for the given number of photos and discount rate.
 *
 * @param discount The discount rate to be applied.
 * @param numberOfPhotos The number of photos taken.
 * @param pricePerPhoto The price charged per photo.
 * @return The total price after applying the discount.
 */
fun calculatePrice(discount: Double, numberOfPhotos: Int, pricePerPhoto: Double): Double {

    // Calculate the discount on each photo
    val discountedPricePerPhoto = pricePerPhoto * (1 - discount)

    // Calculate the total price
    val totalPrice = discountedPricePerPhoto * numberOfPhotos

    return totalPrice
}

// Calculate the price for different scenarios
val price1 = calculatePrice(0.1, 5, 50.0) // Apply 10% discount, 5 photos, $50 per photo
val price2 = calculatePrice(0.15, 15, 50.0) // Apply 15% discount, 15 photos, $50 per photo
/**
 * A photographer charges a set price per photo.
 * If the number of photos is greater than 10, the customer receives a 10% discount.
 * If the number of photos is greater than 20, the customer receives a 20% discount.
 * The function calculates the total price for the given number of photos and discount rate.
 *
 * @param discount The discount rate to be applied.
 * @param numberOfPhotos The number of photos taken.
 * @param pricePerPhoto The price charged per photo.
 * @return The total price after applying the discount.
 */
fun calculatePrice(discount: Double, numberOfPhotos: Int, pricePerPhoto: Double): Double {
/**
 * A photographer charges a set price per photo.
 * If the number of photos is greater than 10, the customer receives a 10% discount.
 * If the number of photos is greater than 20, the customer receives a 20% discount.
 * The function calculates the total price for the given number of photos and discount rate.
 *
 * @param discount The discount rate to be applied.
 * @param numberOfPhotos The number of photos taken.
 * @param pricePerPhoto The price charged per photo.
 * @return The total price after applying the discount.
 */
fun calculatePrice(discount: Double, numberOfPhotos: Int, pricePerPhoto: Double): Double {

    // Calculate the discount on each photo
    val discountedPricePerPhoto = pricePerPhoto * (1 - discount)

    // Calculate the total price
    val totalPrice = discountedPricePerPhoto * numberOfPhotos

    return totalPrice
}

// Calculate the price for different scenarios
val price1 = calculatePrice(0.1, 5, 50.0) // Apply 10% discount, 5 photos, $50 per photo
val price2 = calculatePrice(0.15, 15, 50.0) // Apply 15% discount, 15 photos, $50 per photo