# Function using a standard Python loop def calculate_mean_loop(data): total = 0 count = 0 for value in data: total += value count += 1 return total / count # Let’s run it once to make sure it works loop_mean = calculate_mean_loop(temperature_data) print(f”Mean (Loop method): {loop_mean:.4f}”)