Unable to receive the output of the python code.I have tried debugging the code by printing each line
def get_sum_metrics(predictions, metrics=[]):
for i in range(0,3):
metrics.append(lambda x:x+i)
sum_metrics = 0
for metric in metrics:
sum_metrics += metric(predictions)
return sum_metrics
def main():
print(get_sum_metrics(0))
print(get_sum_metrics(1))
print(get_sum_metrics(2))
print(get_sum_metrics(3,[lambda x:x]))
print(get_sum_metrics(0))
print(get_sum_metrics(1))
print(get_sum_metrics(2))
if __name__=='__main__':
main()
expected output should be.. 3 6 9 15 3 6 9
but getting..
6
18
36
18
24
45
72