Challenge question
In a weather forecast, given the actual and forecasted temperatures for each day of a week, find the sum of the weather forecast inaccuracies across all days. The weather forecast inaccuracy on any day is the absolute difference of the actual temperature and the forecasted temperature. Complete the function totalForecastInaccuracy which takes in two integer arrays , denoting actual temperatures, and , denoting forecasted temperatures, across days and returns the sum of the weather forecast inaccuracies across days. Input Format The first line contains space-separated integers t1,t2....t7 The second line contains space-separated integers f1,f2...f7 Constraints Output Format Print a single integer denoting the answer. Sample Input 0 14 13 12 13 16 18 21 15 11 12 11 16 19 24 Sample Output 0 9 Default Code: #!/bin/python3 import os import sys # Complete the totalForecastInaccuracy function below. def totalForecastInaccuracy(t, f): # Return the sum of the weather forecast inaccuracies across all 7 days. if __name__ == '__main__': fptr = open(os.environ['OUTPUT_PATH'], 'w') t = list(map(int, input().rstrip().split())) f = list(map(int, input().rstrip().split())) result = totalForecastInaccuracy(t, f) fptr.write(str(result) + '\n') fptr.close()