Related to compute f(n) question given in practise section

sir my code is giving a desired output then also it shows this

my code