/**
 * Given the distance from a star and the size of a planet,
 * this function returns the number of planets an astronomer
 * might discover using telescope observations.
 *
 * @param distance the distance from the star to the planet (in light-years)
 * @param size the size of the planet (in Earth radii)
 * @return the estimated number of planets
 */
fun countPlanets(distance: Double, size: Double): Int {

    return when {
        distance < 100 && size >= 1.0 -> 10
        distance < 100 && size < 1.0 -> 5
        distance >= 100 && size >= 1.0 -> 8
        distance >= 100 && size < 1.0 -> 2
        else -> -1
    }
}
/**
 * Given the distance from a star and the size of a planet,
 * this function returns the number of planets an astronomer
 * might discover using telescope observations.
 *
 * @param distance the distance from the star to the planet (in light-years)
 * @param size the size of the planet (in Earth radii)
 * @return the estimated number of planets
 */
fun countPlanets(distance: Double, size: Double): Int {
/**
 * Given the distance from a star and the size of a planet,
 * this function returns the number of planets an astronomer
 * might discover using telescope observations.
 *
 * @param distance the distance from the star to the planet (in light-years)
 * @param size the size of the planet (in Earth radii)
 * @return the estimated number of planets
 */
fun countPlanets(distance: Double, size: Double): Int {

    return when {
        distance < 100 && size >= 1.0 -> 10
        distance < 100 && size < 1.0 -> 5
        distance >= 100 && size >= 1.0 -> 8
        distance >= 100 && size < 1.0 -> 2
        else -> -1
    }
}