''' # Measurements (error types III) We want to take the list of 10 measurements and calculate the average and range. The code contains two mistakes. One of these will give an error, the other is a conceptual mistake. Figure out the mistakes and fix them; furthermore, figure out what type of error this code gives. ''' measurements = [1.5, 3.0, 2.7, 1.1, 7.8, 5.4, 3.7, 4.4, 9.6, 5.6] measurements = sorted(measurements) print(f"The sorted list of measurements is the following: {measurements}") number_of_measurements = len(measurements) highest_value = measurements[number_of_measurements] lowest_value = measurements[1] range = highest_value - lowest_value average = sum(measurements) / number_of_measurements print(f"The range of the measurements is {range:.2} whereas the average of the measurements is {average:.2}.")