/**
 * A police officer wants to determine if a driver is speeding given their speed and the speed limit.
 *
 * Complete the function by using an if-else-if statement to check the following conditions:
 * - If the speed is less than or equal to the speed limit, return "Not Speeding."
 * - If the speed is more than the speed limit, but less than or equal to 10 above the speed limit, return "Minor Infraction."
 * - If the speed is more than 10 above the speed limit, but less than or equal to 20 above the speed limit, return "Major Infraction."
 * - If the speed is more than 20 above the speed limit, return "License Suspended."
 *
 * You should use the variables 'speed' and 'limit' in your code.
 *
 * Example:
 * isSpeeding(60, 50)
 * Output: 'Minor Infraction'
 */
fun isSpeeding(speed: Int, limit: Int): String {

    return when {
        speed <= limit -> "Not Speeding."
        speed <= limit + 10 -> "Minor Infraction."
        speed <= limit + 20 -> "Major Infraction."
        else -> "License Suspended."
    }
}
/**
 * A police officer wants to determine if a driver is speeding given their speed and the speed limit.
 *
 * Complete the function by using an if-else-if statement to check the following conditions:
 * - If the speed is less than or equal to the speed limit, return "Not Speeding."
 * - If the speed is more than the speed limit, but less than or equal to 10 above the speed limit, return "Minor Infraction."
 * - If the speed is more than 10 above the speed limit, but less than or equal to 20 above the speed limit, return "Major Infraction."
 * - If the speed is more than 20 above the speed limit, return "License Suspended."
 *
 * You should use the variables 'speed' and 'limit' in your code.
 *
 * Example:
 * isSpeeding(60, 50)
 * Output: 'Minor Infraction'
 */
fun isSpeeding(speed: Int, limit: Int): String {
/**
 * A police officer wants to determine if a driver is speeding given their speed and the speed limit.
 *
 * Complete the function by using an if-else-if statement to check the following conditions:
 * - If the speed is less than or equal to the speed limit, return "Not Speeding."
 * - If the speed is more than the speed limit, but less than or equal to 10 above the speed limit, return "Minor Infraction."
 * - If the speed is more than 10 above the speed limit, but less than or equal to 20 above the speed limit, return "Major Infraction."
 * - If the speed is more than 20 above the speed limit, return "License Suspended."
 *
 * You should use the variables 'speed' and 'limit' in your code.
 *
 * Example:
 * isSpeeding(60, 50)
 * Output: 'Minor Infraction'
 */
fun isSpeeding(speed: Int, limit: Int): String {

    return when {
        speed <= limit -> "Not Speeding."
        speed <= limit + 10 -> "Minor Infraction."
        speed <= limit + 20 -> "Major Infraction."
        else -> "License Suspended."
    }
}