/**
 * Given a list of complex numbers in polar representation, modify the magnitude and phase of each number.
 *
 * @param complexNums A list of complex numbers in polar representation, where each element is a Pair (r, theta).
 * @return A new list of modified complex numbers in polar representation.
 */
fun modifyComplexNums(complexNums: List<Pair<Double, Double>>): List<Pair<Double, Double>> {

    val modifiedNums = mutableListOf<Pair<Double, Double>>()
    for (num in complexNums) {
        // Extract the magnitude and phase
        val (magnitude, phase) = num

        // MODIFY THE ELEMENT HERE

        // Append the modified complex number to the new list
        modifiedNums.add(Pair(magnitude, phase))
    }
    return modifiedNums
}
/**
 * Given a list of complex numbers in polar representation, modify the magnitude and phase of each number.
 *
 * @param complexNums A list of complex numbers in polar representation, where each element is a Pair (r, theta).
 * @return A new list of modified complex numbers in polar representation.
 */
fun modifyComplexNums(complexNums: List<Pair<Double, Double>>): List<Pair<Double, Double>> {
/**
 * Given a list of complex numbers in polar representation, modify the magnitude and phase of each number.
 *
 * @param complexNums A list of complex numbers in polar representation, where each element is a Pair (r, theta).
 * @return A new list of modified complex numbers in polar representation.
 */
fun modifyComplexNums(complexNums: List<Pair<Double, Double>>): List<Pair<Double, Double>> {

    val modifiedNums = mutableListOf<Pair<Double, Double>>()
    for (num in complexNums) {
        // Extract the magnitude and phase
        val (magnitude, phase) = num

        // MODIFY THE ELEMENT HERE

        // Append the modified complex number to the new list
        modifiedNums.add(Pair(magnitude, phase))
    }
    return modifiedNums
}