/**
 * An archaeologist wants to determine the expansion rate of an ancient site over a certain number of years.
 * The calculateExpansionOfSite function takes in the number of years and the growth rate of the site as parameters.
 * It returns a list of predicted sizes of the site for each year, starting from year 1 up to the given number of years.
 *
 * Example:
 * input: calculateExpansionOfSite(5, 0.25)
 * output: [1.0, 1.25, 1.5625, 1.953125, 2.44140625]
 *
 * @param num_of_years an integer representing the number of years to predict the expansion
 * @param rate a float representing the site's growth rate per year
 * @return a list of predicted sizes of the site for each year
 */
fun calculateExpansionOfSite(numOfYears: Int, rate: Double): List<Double> {

    val siteSizes = mutableListOf<Double>()
    var currentSize = 1.0
    for (year in 1..numOfYears) {
        currentSize *= (1 + rate)
        siteSizes.add(currentSize)
    }
    return siteSizes
}
/**
 * An archaeologist wants to determine the expansion rate of an ancient site over a certain number of years.
 * The calculateExpansionOfSite function takes in the number of years and the growth rate of the site as parameters.
 * It returns a list of predicted sizes of the site for each year, starting from year 1 up to the given number of years.
 *
 * Example:
 * input: calculateExpansionOfSite(5, 0.25)
 * output: [1.0, 1.25, 1.5625, 1.953125, 2.44140625]
 *
 * @param num_of_years an integer representing the number of years to predict the expansion
 * @param rate a float representing the site's growth rate per year
 * @return a list of predicted sizes of the site for each year
 */
fun calculateExpansionOfSite(numOfYears: Int, rate: Double): List<Double> {
/**
 * An archaeologist wants to determine the expansion rate of an ancient site over a certain number of years.
 * The calculateExpansionOfSite function takes in the number of years and the growth rate of the site as parameters.
 * It returns a list of predicted sizes of the site for each year, starting from year 1 up to the given number of years.
 *
 * Example:
 * input: calculateExpansionOfSite(5, 0.25)
 * output: [1.0, 1.25, 1.5625, 1.953125, 2.44140625]
 *
 * @param num_of_years an integer representing the number of years to predict the expansion
 * @param rate a float representing the site's growth rate per year
 * @return a list of predicted sizes of the site for each year
 */
fun calculateExpansionOfSite(numOfYears: Int, rate: Double): List<Double> {

    val siteSizes = mutableListOf<Double>()
    var currentSize = 1.0
    for (year in 1..numOfYears) {
        currentSize *= (1 + rate)
        siteSizes.add(currentSize)
    }
    return siteSizes
}