fix code below to get the correct output getting the following results your Output (stdout) Expected Output def count_operations(ns): # Count the number of operations incurred by calling tabulate on each value in the given list results = [] for n in ns: count = 0 for i in range(1, n+1): for j in range(1, n+1): count += 1 count += 1 count += (i*j)%n count += (i//j) results.append(count) return results .