/**
 * This function checks if a police officer can give a ticket based on the driver's age,
 * license type, and the number of license points.
 * The police officer can give a ticket if the driver is under 18 years old, has a learner's permit,
 * and has less than 6 license points; or if the driver is between 18 and 25 years old,
 * has a full driver's license, and has less than 4 license points.
 *
 * @param age an integer representing the driver's age
 * @param licenseType a string representing the driver's license type
 * @param licensePoints an integer representing the driver's number of license points
 * @return True if the police officer can give a ticket, False otherwise
 */
fun checkLicense(age: Int, licenseType: String, licensePoints: Int): Boolean {

    // Check if the driver is under 18 years old, has a learner's permit, and has less than 6 license points
    if (age < 18 && licenseType == "learner's permit" && licensePoints < 6) {
        return true
    }

    // Check if the driver is between 18 and 25 years old, has a full driver's license, and has less than 4 license points
    if (age in 18..25 && licenseType == "full driver's license" && licensePoints < 4) {
        return true
    }

    return false
}
/**
 * This function checks if a police officer can give a ticket based on the driver's age,
 * license type, and the number of license points.
 * The police officer can give a ticket if the driver is under 18 years old, has a learner's permit,
 * and has less than 6 license points; or if the driver is between 18 and 25 years old,
 * has a full driver's license, and has less than 4 license points.
 *
 * @param age an integer representing the driver's age
 * @param licenseType a string representing the driver's license type
 * @param licensePoints an integer representing the driver's number of license points
 * @return True if the police officer can give a ticket, False otherwise
 */
fun checkLicense(age: Int, licenseType: String, licensePoints: Int): Boolean {
/**
 * This function checks if a police officer can give a ticket based on the driver's age,
 * license type, and the number of license points.
 * The police officer can give a ticket if the driver is under 18 years old, has a learner's permit,
 * and has less than 6 license points; or if the driver is between 18 and 25 years old,
 * has a full driver's license, and has less than 4 license points.
 *
 * @param age an integer representing the driver's age
 * @param licenseType a string representing the driver's license type
 * @param licensePoints an integer representing the driver's number of license points
 * @return True if the police officer can give a ticket, False otherwise
 */
fun checkLicense(age: Int, licenseType: String, licensePoints: Int): Boolean {

    // Check if the driver is under 18 years old, has a learner's permit, and has less than 6 license points
    if (age < 18 && licenseType == "learner's permit" && licensePoints < 6) {
        return true
    }

    // Check if the driver is between 18 and 25 years old, has a full driver's license, and has less than 4 license points
    if (age in 18..25 && licenseType == "full driver's license" && licensePoints < 4) {
        return true
    }

    return false
}