Hello @Shashi_Rathore,
The error indicates that you didn’t indent your code correctly. You might read this guide on indentation or google the error messages for more details about it. You are implementing a function, and you will need to figure out how to indent to make codes part of a function.
Cheers,
Raymond
PS: I am removing your code since it isn’t allowed to share it here. Next time, please post only the error traceback. Thank you.