/**
 * A function to determine the classification of a star based on its magnitude and spectral type.
 *
 * @param magnitude The magnitude of the star.
 * @param spectralType The spectral type of the star.
 * @return The classification of the star.
 */
fun starClassification(magnitude: Double, spectralType: String): String {

    return when {
        magnitude < -3.0 -> "Giant"
        magnitude > 5.0 -> "Dwarf"
        spectralType == "O" -> "Main Sequence"
        magnitude <= -2.0 -> "Supergiant"
        magnitude > 0.0 -> "Subgiant"
        else -> "Unknown"
    }
}
/**
 * A function to determine the classification of a star based on its magnitude and spectral type.
 *
 * @param magnitude The magnitude of the star.
 * @param spectralType The spectral type of the star.
 * @return The classification of the star.
 */
fun starClassification(magnitude: Double, spectralType: String): String {
/**
 * A function to determine the classification of a star based on its magnitude and spectral type.
 *
 * @param magnitude The magnitude of the star.
 * @param spectralType The spectral type of the star.
 * @return The classification of the star.
 */
fun starClassification(magnitude: Double, spectralType: String): String {

    return when {
        magnitude < -3.0 -> "Giant"
        magnitude > 5.0 -> "Dwarf"
        spectralType == "O" -> "Main Sequence"
        magnitude <= -2.0 -> "Supergiant"
        magnitude > 0.0 -> "Subgiant"
        else -> "Unknown"
    }
}