It is showing function is not declared

hey @tharun your code is running without any compilation error, can you elaborate your question?