/**
 * Given the aperture, ISO, and shutter speed, calculate the exposure time in seconds.
 *
 * @param aperture The aperture value.
 * @param iso The ISO value.
 * @param shutterSpeed The shutter speed value.
 * @return The calculated exposure time in seconds.
 */
fun calculateExposureTime(aperture: Double, iso: Int, shutterSpeed: Double): Double {

    var exposureTime: Double = 0.0

    // Complete the code below to calculate the exposure time
    while (true) {
        if (aperture <= 0 || iso <= 0 || shutterSpeed <= 0) {
            println("Invalid input. Please provide positive values for aperture, ISO, and shutter speed.")
            break
        } else if (aperture > 100 || iso > 6400 || shutterSpeed > 30) {
            println("Invalid input. The values for aperture, ISO, and shutter speed must be within normal ranges.")
            break
        } else if (aperture > 0 && iso > 0 && shutterSpeed > 0) {
            exposureTime = 1 / (aperture * iso * shutterSpeed)
            break
        }
    }

    return exposureTime
}
/**
 * Given the aperture, ISO, and shutter speed, calculate the exposure time in seconds.
 *
 * @param aperture The aperture value.
 * @param iso The ISO value.
 * @param shutterSpeed The shutter speed value.
 * @return The calculated exposure time in seconds.
 */
fun calculateExposureTime(aperture: Double, iso: Int, shutterSpeed: Double): Double {
/**
 * Given the aperture, ISO, and shutter speed, calculate the exposure time in seconds.
 *
 * @param aperture The aperture value.
 * @param iso The ISO value.
 * @param shutterSpeed The shutter speed value.
 * @return The calculated exposure time in seconds.
 */
fun calculateExposureTime(aperture: Double, iso: Int, shutterSpeed: Double): Double {

    var exposureTime: Double = 0.0

    // Complete the code below to calculate the exposure time
    while (true) {
        if (aperture <= 0 || iso <= 0 || shutterSpeed <= 0) {
            println("Invalid input. Please provide positive values for aperture, ISO, and shutter speed.")
            break
        } else if (aperture > 100 || iso > 6400 || shutterSpeed > 30) {
            println("Invalid input. The values for aperture, ISO, and shutter speed must be within normal ranges.")
            break
        } else if (aperture > 0 && iso > 0 && shutterSpeed > 0) {
            exposureTime = 1 / (aperture * iso * shutterSpeed)
            break
        }
    }

    return exposureTime
}