/**
 * A police officer wants to check if a driver's speed is within the ticketed speeds list using a ternary operator.
 *
 * Write a function that takes the current speed and a list of ticketed speeds as parameters and returns "Ticket" if
 * the current speed matches any of the ticketed speeds, otherwise "No Ticket".
 *
 * Assuming the speed is always a positive integer and the ticketed speeds list contains positive integers.
 *
 * Example:
 * checkSpeed(80, listOf(50, 60, 70, 80, 90)) -> "Ticket"
 * checkSpeed(65, listOf(50, 60, 70, 80, 90)) -> "No Ticket"
 * checkSpeed(0, listOf(50, 60, 70, 80, 90)) -> "No Ticket"
 *
 * Note:
 * - Using a ternary operator in Python: result_when_true if condition else result_when_false
 * - Access the elements of a list using indexing: list[index]
 */
fun checkSpeed(speed: Int, ticketedSpeeds: List<Int>): String {

    return if (speed in ticketedSpeeds) "Ticket" else "No Ticket"
}
/**
 * A police officer wants to check if a driver's speed is within the ticketed speeds list using a ternary operator.
 *
 * Write a function that takes the current speed and a list of ticketed speeds as parameters and returns "Ticket" if
 * the current speed matches any of the ticketed speeds, otherwise "No Ticket".
 *
 * Assuming the speed is always a positive integer and the ticketed speeds list contains positive integers.
 *
 * Example:
 * checkSpeed(80, listOf(50, 60, 70, 80, 90)) -> "Ticket"
 * checkSpeed(65, listOf(50, 60, 70, 80, 90)) -> "No Ticket"
 * checkSpeed(0, listOf(50, 60, 70, 80, 90)) -> "No Ticket"
 *
 * Note:
 * - Using a ternary operator in Python: result_when_true if condition else result_when_false
 * - Access the elements of a list using indexing: list[index]
 */
fun checkSpeed(speed: Int, ticketedSpeeds: List<Int>): String {
/**
 * A police officer wants to check if a driver's speed is within the ticketed speeds list using a ternary operator.
 *
 * Write a function that takes the current speed and a list of ticketed speeds as parameters and returns "Ticket" if
 * the current speed matches any of the ticketed speeds, otherwise "No Ticket".
 *
 * Assuming the speed is always a positive integer and the ticketed speeds list contains positive integers.
 *
 * Example:
 * checkSpeed(80, listOf(50, 60, 70, 80, 90)) -> "Ticket"
 * checkSpeed(65, listOf(50, 60, 70, 80, 90)) -> "No Ticket"
 * checkSpeed(0, listOf(50, 60, 70, 80, 90)) -> "No Ticket"
 *
 * Note:
 * - Using a ternary operator in Python: result_when_true if condition else result_when_false
 * - Access the elements of a list using indexing: list[index]
 */
fun checkSpeed(speed: Int, ticketedSpeeds: List<Int>): String {

    return if (speed in ticketedSpeeds) "Ticket" else "No Ticket"
}