/**
 * This exercise requires creating a tuple using parentheses and using null as a placeholder.
 *
 * Your task is to create a tuple with two elements: the first element should be the input parameter t1, and the
 * second element should be the input parameter t2. However, if either t1 or t2 is null, you should use null
 * as a placeholder in the tuple instead.
 *
 * Complete the code below to solve the exercise.
 */
fun createTupleWithPlaceholder(t1: Any?, t2: Any?): Pair<Any?, Any?> {

    // Check if t1 or t2 is null, and create the tuple accordingly
    val result = when {
        t1 == null && t2 == null -> Pair(null, null)
        t1 == null -> Pair(null, t2)
        t2 == null -> Pair(t1, null)
        else -> Pair(t1, t2)
    }

    return result
}
/**
 * This exercise requires creating a tuple using parentheses and using null as a placeholder.
 *
 * Your task is to create a tuple with two elements: the first element should be the input parameter t1, and the
 * second element should be the input parameter t2. However, if either t1 or t2 is null, you should use null
 * as a placeholder in the tuple instead.
 *
 * Complete the code below to solve the exercise.
 */
fun createTupleWithPlaceholder(t1: Any?, t2: Any?): Pair<Any?, Any?> {
/**
 * This exercise requires creating a tuple using parentheses and using null as a placeholder.
 *
 * Your task is to create a tuple with two elements: the first element should be the input parameter t1, and the
 * second element should be the input parameter t2. However, if either t1 or t2 is null, you should use null
 * as a placeholder in the tuple instead.
 *
 * Complete the code below to solve the exercise.
 */
fun createTupleWithPlaceholder(t1: Any?, t2: Any?): Pair<Any?, Any?> {

    // Check if t1 or t2 is null, and create the tuple accordingly
    val result = when {
        t1 == null && t2 == null -> Pair(null, null)
        t1 == null -> Pair(null, t2)
        t2 == null -> Pair(t1, null)
        else -> Pair(t1, t2)
    }

    return result
}