/**
 * This function represents a police officer patrolling a street. It checks if a person is present on the street and
 * investigates the situation accordingly.
 *
 * @param street The name of the street being patrolled.
 * @param person A boolean value indicating whether a person is present on the street or not.
 * @return A message describing the action taken by the police officer.
 */
fun patrol(street: String, person: Boolean): String {

    if (person) {  // If a person is present on the street
        when (street) {
            "Main Street" -> {
                return "Alert! There is a person on Main Street. Instruct them to clear the area and maintain order."
            }
            "Broadway" -> {
                return "Alert! There is a person on Broadway. Coordinate with backup units and secure the scene."
            }
            "Park Lane" -> {
                return "Alert! There is a person on Park Lane. Investigate further"
            }
        }
    }
    return "No action taken. Street is clear."
}
/**
 * This function represents a police officer patrolling a street. It checks if a person is present on the street and
 * investigates the situation accordingly.
 *
 * @param street The name of the street being patrolled.
 * @param person A boolean value indicating whether a person is present on the street or not.
 * @return A message describing the action taken by the police officer.
 */
fun patrol(street: String, person: Boolean): String {
/**
 * This function represents a police officer patrolling a street. It checks if a person is present on the street and
 * investigates the situation accordingly.
 *
 * @param street The name of the street being patrolled.
 * @param person A boolean value indicating whether a person is present on the street or not.
 * @return A message describing the action taken by the police officer.
 */
fun patrol(street: String, person: Boolean): String {

    if (person) {  // If a person is present on the street
        when (street) {
            "Main Street" -> {
                return "Alert! There is a person on Main Street. Instruct them to clear the area and maintain order."
            }
            "Broadway" -> {
                return "Alert! There is a person on Broadway. Coordinate with backup units and secure the scene."
            }
            "Park Lane" -> {
                return "Alert! There is a person on Park Lane. Investigate further"
            }
        }
    }
    return "No action taken. Street is clear."
}