Lab 3.1 – calculating geometric mean with chat completion
In Lab 3.1, we will explore the geometric mean through the chat interaction mode. The geometric mean is a way of averaging numbers that are multiplicative in nature, such as financial portfolio growth rates, population growth rates, or drug concentrations that vary exponentially over time. Unlike the arithmetic mean, which calculates the sum of a sequence of numbers divided by its length, the geometric mean is the n-th root of the product of the numbers:
For example, the geometric mean of 5 and 20 is 10, because of the following:
Similarly, the geometric mean of 5, 20, and 10 is also 10, because of the following:
In this lab, we will use the chat window along with code completion. First, we will obtain an explanation of the geometric mean using the chat window. Next, we will utilize Copilot to complete an implementation based on a function signature, including the name, parameters, type...