def calcAvg(aList): acc = 0.0 numbers = 0 for item in aList: if type(item) == int: acc = acc + item numbers = numbers+1 avg = acc / numbers return avg #define the Test data testData = [1,2,3,4, "Test"] #Exercise the function using test data. print("Average is:", calcAvg(testData) )