/**
 * Given a list of complex numbers in polar representation,
 * calculate the average amplitude of the numbers.
 *
 * @param complexNumbers A list of complex numbers in polar representation
 * @return The average amplitude of the complex numbers
 */
fun findAverageAmplitude(complexNumbers: List<Pair<Double, Double>>): Double {

    var totalAmplitude = 0.0
    var count = 0

    for ((magnitude, _) in complexNumbers) {
        val amplitude = magnitude
        totalAmplitude += amplitude
        count++
    }

    val averageAmplitude = totalAmplitude / count
    return averageAmplitude
}
/**
 * Given a list of complex numbers in polar representation,
 * calculate the average amplitude of the numbers.
 *
 * @param complexNumbers A list of complex numbers in polar representation
 * @return The average amplitude of the complex numbers
 */
fun findAverageAmplitude(complexNumbers: List<Pair<Double, Double>>): Double {
/**
 * Given a list of complex numbers in polar representation,
 * calculate the average amplitude of the numbers.
 *
 * @param complexNumbers A list of complex numbers in polar representation
 * @return The average amplitude of the complex numbers
 */
fun findAverageAmplitude(complexNumbers: List<Pair<Double, Double>>): Double {

    var totalAmplitude = 0.0
    var count = 0

    for ((magnitude, _) in complexNumbers) {
        val amplitude = magnitude
        totalAmplitude += amplitude
        count++
    }

    val averageAmplitude = totalAmplitude / count
    return averageAmplitude
}