/**
 * This exercise tests your understanding of the AND operator and modifying tuples in Python.
 * A police officer wants to issue a ticket if the driver was speeding AND the last digit of their license plate is odd.
 * Fill in the missing parts of the code to achieve this.
 *
 * @param speed the speed of the driver
 * @param licensePlate the license plate number of the driver
 * @return true if a ticket should be issued, false otherwise
 */
fun policeOfficerTickets(speed: Int, licensePlate: String): Boolean {

    // Check if the speed is greater than 80 AND the last digit of the license plate is odd
    val lastDigit = licensePlate.last().toString().toInt()
    val ticket = speed > 80 && lastDigit % 2 != 0
    return ticket
}
/**
 * This exercise tests your understanding of the AND operator and modifying tuples in Python.
 * A police officer wants to issue a ticket if the driver was speeding AND the last digit of their license plate is odd.
 * Fill in the missing parts of the code to achieve this.
 *
 * @param speed the speed of the driver
 * @param licensePlate the license plate number of the driver
 * @return true if a ticket should be issued, false otherwise
 */
fun policeOfficerTickets(speed: Int, licensePlate: String): Boolean {
/**
 * This exercise tests your understanding of the AND operator and modifying tuples in Python.
 * A police officer wants to issue a ticket if the driver was speeding AND the last digit of their license plate is odd.
 * Fill in the missing parts of the code to achieve this.
 *
 * @param speed the speed of the driver
 * @param licensePlate the license plate number of the driver
 * @return true if a ticket should be issued, false otherwise
 */
fun policeOfficerTickets(speed: Int, licensePlate: String): Boolean {

    // Check if the speed is greater than 80 AND the last digit of the license plate is odd
    val lastDigit = licensePlate.last().toString().toInt()
    val ticket = speed > 80 && lastDigit % 2 != 0
    return ticket
}