Versuch6: Fix for calculating the Average