/**
 * Given the temperature, luminosity and distance of a star, this function determines its type.
 *
 * @param temperature The temperature of the star in Kelvin.
 * @param luminosity The luminosity of the star in solar units.
 * @param distance The distance of the star in light years.
 * @return The type of the star (e.g. main-sequence, giant, supergiant).
 */
fun checkStarType(temperature: Double, luminosity: Double, distance: Int): String {

    // Check if the star is a main-sequence star
    if (temperature > 4500 && temperature < 7500) {
        if (luminosity > 0.08 && luminosity < 50) {
            if (distance > 0 && distance < 500) {
                return "main-sequence"
            }
        }
    }

    // Check if the star is a giant star
    if (temperature < 4500 && luminosity > 50 && distance > 500) {
        return "giant"
    }

    // Check if the star is a supergiant star
    if (temperature > 7500 && luminosity > 5000 && distance > 2000) {
        return "supergiant"
    }

    return "unknown"
}
/**
 * Given the temperature, luminosity and distance of a star, this function determines its type.
 *
 * @param temperature The temperature of the star in Kelvin.
 * @param luminosity The luminosity of the star in solar units.
 * @param distance The distance of the star in light years.
 * @return The type of the star (e.g. main-sequence, giant, supergiant).
 */
fun checkStarType(temperature: Double, luminosity: Double, distance: Int): String {
/**
 * Given the temperature, luminosity and distance of a star, this function determines its type.
 *
 * @param temperature The temperature of the star in Kelvin.
 * @param luminosity The luminosity of the star in solar units.
 * @param distance The distance of the star in light years.
 * @return The type of the star (e.g. main-sequence, giant, supergiant).
 */
fun checkStarType(temperature: Double, luminosity: Double, distance: Int): String {

    // Check if the star is a main-sequence star
    if (temperature > 4500 && temperature < 7500) {
        if (luminosity > 0.08 && luminosity < 50) {
            if (distance > 0 && distance < 500) {
                return "main-sequence"
            }
        }
    }

    // Check if the star is a giant star
    if (temperature < 4500 && luminosity > 50 && distance > 500) {
        return "giant"
    }

    // Check if the star is a supergiant star
    if (temperature > 7500 && luminosity > 5000 && distance > 2000) {
        return "supergiant"
    }

    return "unknown"
}